-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (39 loc) · 1.16 KB
/
testing-ci.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Tuki Testing CI
on:
workflow_dispatch:
push:
pull_request:
branches:
- main
- develop
jobs:
test:
runs-on: ubuntu-latest
env:
ENVIRONMENT: test
TEST_DIRECTORY: ${{ github.workspace }}/app/tests
TEST_DB_FILE: ${{ github.workspace }}/app/database/database_test.sqlite
PYTHON_VERSION: "3.10"
steps:
- uses: actions/checkout@v4
- name: Install poetry
run: pipx install poetry
- name: Set up Python and dependency cache
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
cache: "poetry"
- name: Install dependencies
run: poetry install
- name: Test Game module
run: |
poetry run coverage run -m pytest ${{ env.TEST_DIRECTORY }}/game_tests
rm -f $TEST_DB_FILE
- name: Test Player module
run: |
poetry run coverage run -m pytest ${{ env.TEST_DIRECTORY }}/player_tests
rm -f $TEST_DB_FILE
- name: Test Card module
run: |
poetry run coverage run -m pytest ${{ env.TEST_DIRECTORY }}/card_tests
rm -f $TEST_DB_FILE