diff --git a/.forgejo/workflows/test.yml b/.forgejo/workflows/test.yml new file mode 100644 index 0000000..b87db85 --- /dev/null +++ b/.forgejo/workflows/test.yml @@ -0,0 +1,28 @@ +name: "Test the project" + +jobs: + test-library: + runs-on: ubuntu-latest + strategy: + matrix: + BUILD_TARGET: [release] + outputs: + release_built: ${{ steps.set-output.outputs.release_built }} + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Cache + uses: actions/cache@v4 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + target + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + + - name: Build binaries in "${{ matrix.BUILD_TARGET }}" mode + run: cargo build --profile ${{ matrix.BUILD_TARGET }} + + - name: Run tests in "${{ matrix.BUILD_TARGET }}" mode + run: cargo test --profile ${{ matrix.BUILD_TARGET }} \ No newline at end of file