RHCLOUD-31731: pr_check updates #540
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-22.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@v5 | |
name: Set up golang 1.18 | |
with: | |
go-version: '1.18.4' | |
- name: Check out source code | |
uses: actions/checkout@v4 | |
- name: Run Tests | |
run: go test ./... | |
env: | |
DATABASE_USER: postgres | |
DATABASE_PASSWORD: toor | |
DATABASE_HOST: localhost | |
DATABASE_NAME: postgres | |
- uses: actions/setup-node@v4 | |
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 |