fix: use compose v2 on GHA tests #531
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Run Unit Tests | |
'on': | |
- pull_request | |
- push | |
jobs: | |
testing: | |
runs-on: ubuntu-20.04 | |
services: | |
postgres: | |
image: docker.io/postgres:14 | |
env: | |
POSTGRES_PASSWORD: toor | |
ports: | |
- 5432:5432 | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
steps: | |
- uses: actions/setup-go@v2 | |
name: Set up golang 1.18 | |
with: | |
go-version: '1.18.4' | |
- name: Check out source code | |
uses: actions/checkout@v2 | |
- name: Run Tests | |
run: go test ./... | |
env: | |
DATABASE_USER: postgres | |
DATABASE_PASSWORD: toor | |
DATABASE_HOST: localhost | |
DATABASE_NAME: postgres | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: Setup E2E testing environment | |
run: docker compose -f deployments/compose.yaml up -d --build | |
- name: Wait for Keycloak import to complete | |
run: deployments/wait_for_keycloak_import.sh deployments/compose.yaml | |
- name: Install test environment | |
run: npm --prefix test ci | |
- name: E2E tests | |
run: npm --prefix test test |