Skip to content

Commit fb057bc

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

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

.github/workflows/tests.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Tests
2+
# This workflow is intended to follow testing as performed manually
3+
# by an actual developer. This includes using make and relying on docker
4+
# or podman CLI to build images.
5+
# The intent is to verify that developers can run these tests locally,
6+
# with no, or at worst minimal, modifications.
7+
# As such, all changes, that would lead to divergence with recommended
8+
# developer practice, must be justified in comments.
9+
# Divergence:
10+
# SOURCE_BRANCH variable value is set for each execution of make,
11+
# since the actions/checkout execution switches to a single commit.
12+
on:
13+
pull_request:
14+
push:
15+
branches:
16+
- main
17+
18+
jobs:
19+
tests:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- uses: actions/checkout@v4
23+
24+
- name: Install compose
25+
run: |
26+
sudo apt install podman-compose
27+
podman-compose --version
28+
29+
- name: Build Test Image
30+
run: make build-test-image SOURCE_BRANCH=${{ github.head_ref || github.ref_name }}
31+
32+
- name: Run Unit and Integration Tests
33+
run: make check-in-container SOURCE_BRANCH=${{ github.head_ref || github.ref_name }}
34+
35+
- name: Run Database Tests
36+
run: make check-db SOURCE_BRANCH=${{ github.head_ref || github.ref_name }} COMPOSE=podman-compose

0 commit comments

Comments
 (0)