Skip to content

Commit c51baf5

Browse files
committed
Adding workflow for tests
Signed-off-by: Jiri Podivin <[email protected]>
1 parent 2054d62 commit c51baf5

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

.github/workflows/tests.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Tests
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
9+
jobs:
10+
tests:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- name: Install compose
16+
run: sudo apt install docker-compose-plugin
17+
18+
- name: Build Test Image
19+
# Build the test image locally so all subsequent steps use the fresh code.
20+
run: make build-test-image SOURCE_BRANCH=${{ github.head_ref || github.ref_name }}
21+
22+
- name: Run Unit and Integration Tests
23+
# Runs pytest on tests/unit and tests/integration inside the container
24+
run: make check-in-container SOURCE_BRANCH=${{ github.head_ref || github.ref_name }}
25+
26+
- name: Run Database Tests
27+
# Spins up postgres/redis via docker-compose and runs tests_openshift/database
28+
run: make check-db SOURCE_BRANCH=${{ github.head_ref || github.ref_name }}

0 commit comments

Comments
 (0)