Skip to content

Commit

Permalink
ci: Split stage in GHA
Browse files Browse the repository at this point in the history
  • Loading branch information
attakei committed Mar 18, 2024
1 parent 5fbd3ad commit 01fb547
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,35 @@ on:
workflow_dispatch:

jobs:
test:
build:
runs-on: 'ubuntu-latest'
steps:
- uses: 'actions/checkout@v4'
- uses: 'actions/cache@v4'
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}
- name: 'Build'
run: cargo build --verbose
unittest:
needs: [build]
runs-on: 'ubuntu-latest'
steps:
- uses: 'actions/checkout@v4'
- uses: 'actions/cache/restore@v4'
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}
- name: 'Run test'
run: cargo test --verbose

0 comments on commit 01fb547

Please sign in to comment.