ci: Run cargo test
This commit is contained in:
parent
1f57508879
commit
a4ad72e11d
1 changed files with 58 additions and 1 deletions
|
@ -81,3 +81,60 @@ jobs:
|
||||||
|
|
||||||
- name: Show sccache stats
|
- name: Show sccache stats
|
||||||
run: sccache --show-stats
|
run: sccache --show-stats
|
||||||
|
|
||||||
|
cargo-test:
|
||||||
|
name: Cargo Test
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
|
||||||
|
- name: Install rust
|
||||||
|
uses: ./.forgejo/actions/rust-toolchain
|
||||||
|
|
||||||
|
- uses: https://github.com/actions/create-github-app-token@v2
|
||||||
|
id: app-token
|
||||||
|
with:
|
||||||
|
app-id: ${{ vars.GH_APP_ID }}
|
||||||
|
private-key: ${{ secrets.GH_APP_PRIVATE_KEY }}
|
||||||
|
github-api-url: https://api.github.com
|
||||||
|
owner: ${{ vars.GH_APP_OWNER }}
|
||||||
|
repositories: ""
|
||||||
|
- name: Install sccache
|
||||||
|
uses: ./.forgejo/actions/sccache
|
||||||
|
with:
|
||||||
|
token: ${{ steps.app-token.outputs.token }}
|
||||||
|
- run: sudo apt-get update
|
||||||
|
- name: Install system dependencies
|
||||||
|
uses: https://github.com/awalsh128/cache-apt-pkgs-action@v1
|
||||||
|
with:
|
||||||
|
packages: clang liburing-dev
|
||||||
|
version: 1
|
||||||
|
- name: Cache Rust registry
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
~/.cargo/git
|
||||||
|
!~/.cargo/git/checkouts
|
||||||
|
~/.cargo/registry
|
||||||
|
!~/.cargo/registry/src
|
||||||
|
key: rust-registry-${{hashFiles('**/Cargo.lock') }}
|
||||||
|
- name: Timelord
|
||||||
|
uses: ./.forgejo/actions/timelord
|
||||||
|
with:
|
||||||
|
key: sccache-v0
|
||||||
|
path: .
|
||||||
|
- name: Cargo Test
|
||||||
|
run: |
|
||||||
|
cargo test \
|
||||||
|
--workspace \
|
||||||
|
--locked \
|
||||||
|
--profile test \
|
||||||
|
--all-targets \
|
||||||
|
--no-fail-fast
|
||||||
|
|
||||||
|
- name: Show sccache stats
|
||||||
|
run: sccache --show-stats
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue