diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml index 66aa497..481720f 100644 --- a/.gitea/workflows/ci.yaml +++ b/.gitea/workflows/ci.yaml @@ -5,8 +5,35 @@ on: - 'main' - 'dev' jobs: + test: + name: Run Tests + runs-on: ubuntu-latest + container: + image: rust:slim + steps: + - name: Install System Dependencies + run: | + apt-get update -yq + apt-get install -yq git g++ pkg-config libx11-dev libasound2-dev libudev-dev libxkbcommon-x11-0 libwayland-client-dev nodejs + - name: Checkout + uses: actions/checkout@v4 + - name: Cache Cargo + 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') }} + restore-keys: | + ${{ runner.os }}-cargo- + - name: Run Tests + run: cargo test --verbose build: name: Build Linux + needs: test runs-on: ubuntu-latest container: image: rust:slim @@ -39,30 +66,4 @@ jobs: with: name: pomomon-garden-linux-x86_64-${{ steps.slug.outputs.sha8 }} path: target/x86_64-unknown-linux-gnu/release/pomomon-garden - retention-days: 14 - test: - name: Run Tests - runs-on: ubuntu-latest - container: - image: rust:slim - steps: - - name: Install System Dependencies - run: | - apt-get update -yq - apt-get install -yq git g++ pkg-config libx11-dev libasound2-dev libudev-dev libxkbcommon-x11-0 libwayland-client-dev nodejs - - name: Checkout - uses: actions/checkout@v4 - - name: Cache Cargo - 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') }} - restore-keys: | - ${{ runner.os }}-cargo- - - name: Run Tests - run: cargo test --verbose + retention-days: 14 \ No newline at end of file