-
Notifications
You must be signed in to change notification settings - Fork 465
62 lines (49 loc) · 1.52 KB
/
poetry_unit_testy.yml
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: tests
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened]
jobs:
check_skip:
runs-on: ubuntu-latest
if: "! contains(github.event.head_commit.message, '[ci skip]')"
steps:
- run: echo "${{ github.event.head_commit.message }}"
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] # Testing across multiple Python versions
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: Check OS
run: cat /etc/os-release
- name: Install/upgrade Python setup tools
run: python3 -m pip install --upgrade pip setuptools wheel
- name: Install additional system dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends git make gcc
- name: Install Poetry
run: |
pip install poetry
- name: Configure Poetry
run: |
poetry config virtualenvs.create false
- name: Install dependencies using Poetry
run: |
poetry install
- name: Run Unit Tests
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
run: |
export OPENAI_API_KEY=$OPENAI_API_KEY
make test # Executing tests with Poetry