Improve JSON-RPC CI, no need to build things multiple times

This commit is contained in:
Franz Heinzmann (Frando)
2022-06-29 23:47:26 +02:00
committed by Simon Laux
parent e7da0672ae
commit 7fc162543a

View File

@@ -10,24 +10,7 @@ env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Rust Cache
uses: Swatinem/rust-cache@v1.3.0
- name: Build
run: cargo build --verbose --features webserver -p deltachat-jsonrpc
- name: Run tests
run: cargo test --verbose --features webserver -p deltachat-jsonrpc
ts_bindings:
build_and_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
@@ -40,29 +23,23 @@ jobs:
profile: minimal
toolchain: stable
override: true
- name: Rust Cache
- name: Add Rust cache
uses: Swatinem/rust-cache@v1.3.0
- name: npm i
- name: npm install
run: |
cd deltachat-jsonrpc/typescript
npm i
- name: npm run generate-bindings
run: |
cd deltachat-jsonrpc/typescript
npm run generate-bindings
- name: npm run check ts
run: |
cd deltachat-jsonrpc/typescript
npx tsc --noEmit
- name: run integration tests
npm install
- name: Build TypeScript, run Rust tests, generate bindings
run: |
cd deltachat-jsonrpc/typescript
npm run build
cargo build --features webserver
- name: Run integration tests
run: |
cd deltachat-jsonrpc/typescript
npm run test
env:
DCC_NEW_TMP_EMAIL: ${{ secrets.DCC_NEW_TMP_EMAIL }}
- name: run prettier
- name: Run linter
run: |
cd deltachat-jsonrpc/typescript
npm run prettier:check