Split CI to reduce tests run

common/ is now only run when common is edited. crypto/ when common/ or crypto/.
coins/ when common/ or crypto/ or coins/. The rest of the tests are run
whenever any package is edited (as they're all inter-connected).
This commit is contained in:
Luke Parker
2023-07-17 01:04:05 -04:00
parent 0a367bfbda
commit 808a633e4d
5 changed files with 111 additions and 61 deletions

29
.github/workflows/common-tests.yml vendored Normal file
View File

@@ -0,0 +1,29 @@
name: common/ Tests
on:
push:
branches:
- develop
paths:
- "common/**"
pull_request:
workflow_dispatch:
jobs:
test-common:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Test Dependencies
uses: ./.github/actions/test-dependencies
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Run Tests
run: |
GITHUB_CI=true cargo test --all-features \
-p std-shims \
-p zalloc \
-p serai-db \
-p serai-env