Update test workflow.

This commit is contained in:
Orne Brocaar 2023-05-29 14:51:59 +01:00
parent 1f89f30878
commit c0d4270508
2 changed files with 20 additions and 7 deletions

View File

@ -14,22 +14,31 @@ jobs:
-
name: Checkout
uses: actions/checkout@v2
-
name: Install Nix
uses: cachix/install-nix-action@v20
with:
nix_path: nixpkgs=channel:nixos-22.11
-
name: Cargo cache
uses: actions/cache@v3
with:
path: .rust/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-test-${{ hashFiles('**/Cargo.lock') }}
-
name: Start dependency services
run: docker-compose up -d
-
name: Build UI
run: make build-ui
-
name: Run tests
run: make test
-
name: Make cache accessible to caching action
run: |
sudo chown $(whoami):$(whoami) -R .rust
run: nix-shell --command "make test"
dist:
needs: tests

View File

@ -35,6 +35,8 @@ services:
- ./.docker-compose/postgresql/initdb:/docker-entrypoint-initdb.d
environment:
- POSTGRES_HOST_AUTH_METHOD=trust
ports:
- "5432:5432"
redis:
image: redis:6-alpine
@ -66,3 +68,5 @@ services:
- ALLOW_PLAINTEXT_LISTENER=yes
depends_on:
- zookeeper
ports:
- "9092:9092"