generated from kyma-project/template-repository
-
Notifications
You must be signed in to change notification settings - Fork 13
48 lines (39 loc) · 1.15 KB
/
unit-test.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: Unit Test
on:
pull_request:
branches:
- "main"
- "release-**"
paths-ignore:
- "docs/**"
- "**.md"
- "doc_indexer/**"
- CODEOWNERS
- LICENSE
## **IMPORTANT**: If any changes are made to how to run the unit tests. Make sure to update the steps for unit-tests
## in the create-release.yml workflow as well.
jobs:
unit-test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Extract Python version
id: python-version
run: ./scripts/shell/extract-python-version.sh
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Install dependencies
run: poetry install --with dev
- name: Create config.json
run: |
mkdir -p config
echo '{"mock-key": "mock-value"}' > config/config.json
- name: Run tests
run: poetry run poe test