generated from ilkersigirci/python-template
-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (37 loc) · 1.05 KB
/
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
name: Test the module
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
# NOTE: python -m pytest -n auto doesn't work and not correctly set environment variables
test_matrix:
strategy:
matrix:
python-version: ['3.11', '3.12']
os: [ubuntu-22.04] # windows-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Disable Logger Outputs
run: |
sed -i "s/log_cli = true/log_cli = false/" pyproject.toml
- name: Install the latest version of rye
uses: eifinger/setup-rye@v4
with:
enable-cache: true
cache-prefix: 'rye-venv-cache'
- name: Pin Python Version - ${{ matrix.python-version }}
run: |
rye pin ${{ matrix.python-version }}
- name: Install the Project with Test Dependencies
run: |
rye sync --no-lock
- name: Test the Project
run: |
python -m pytest
# - name: Publish code coverage
# uses: codecov/codecov-action@v3