chore: Split CI into "rust" and "web" tests to speed up time

This commit is contained in:
Nathan Adams 2020-05-18 10:56:05 +02:00
parent 9f4455f2fb
commit ec6363813c
2 changed files with 55 additions and 23 deletions

50
.github/workflows/test_rust.yml vendored Normal file
View File

@ -0,0 +1,50 @@
name: Test Rust
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
name: Test rust ${{ matrix.rust_version }} / ${{ matrix.os }}
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.rust_version == 'nightly' }}
strategy:
fail-fast: false
matrix:
rust_version: ['stable', 'beta', 'nightly']
os: [ubuntu-latest, windows-latest, macOS-latest]
steps:
- uses: actions/checkout@v1
- name: Use stable rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust_version }}
override: true
components: rustfmt, clippy
- name: Install linux depencencies
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get -y install libasound2-dev
- name: Run all rust tests
uses: actions-rs/cargo@v1
with:
command: test
- name: Check clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --all --tests -- -D warnings
- name: Check rust formatting
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check

View File

@ -1,4 +1,4 @@
name: Test Build
name: Test Web
on:
push:
@ -8,14 +8,15 @@ on:
jobs:
build:
name: Test rust ${{ matrix.rust_version }} / node ${{ matrix.node_version }} / ${{ matrix.os }}
name: Test node ${{ matrix.node_version }} / rust ${{ matrix.rust_version }} / ${{ matrix.os }}
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.rust_version == 'nightly' }}
strategy:
fail-fast: false
matrix:
# We most likely don't care about rust versions here, we'll catch those issues in "test rust"
node_version: ['10', '12']
rust_version: ['stable', 'beta', 'nightly']
rust_version: ['stable']
os: [ubuntu-latest, windows-latest, macOS-latest]
steps:
@ -31,8 +32,6 @@ jobs:
with:
profile: minimal
toolchain: ${{ matrix.rust_version }}
override: true
components: rustfmt, clippy
- name: Install linux depencencies
if: matrix.os == 'ubuntu-latest'
@ -41,23 +40,6 @@ jobs:
- name: Install wasm-pack
run: cargo install wasm-pack
- name: Run all rust tests
uses: actions-rs/cargo@v1
with:
command: test
- name: Check clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --all --tests -- -D warnings
- name: Check rust formatting
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- name: Install web
working-directory: web
run: |