diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d687fd8..d8b0a8e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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