Skip to content

Commit 7b92a4a

Browse files
committed
Add strategy matrix to test GitHub Action
1 parent c8d1a07 commit 7b92a4a

File tree

1 file changed

+25
-6
lines changed

1 file changed

+25
-6
lines changed

.github/workflows/tests.yml

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,41 @@ name: Tests
22
on:
33
workflow_call:
44
workflow_dispatch:
5+
56
jobs:
67
test:
78
runs-on: ubuntu-latest
8-
container:
9-
image: python:3.12-slim
10-
env:
11-
YEPCODE_API_TOKEN: ${{ secrets.TEST_YEPCODE_API_TOKEN }}
9+
strategy:
10+
matrix:
11+
python-version: ["3.11", "3.12", "3.13"]
12+
fail-fast: false
13+
1214
steps:
1315
- uses: actions/checkout@v4
16+
17+
- name: Set up Python ${{ matrix.python-version }}
18+
uses: actions/setup-python@v4
19+
with:
20+
python-version: ${{ matrix.python-version }}
21+
22+
- name: Install system dependencies
23+
run: |
24+
sudo apt-get update
25+
sudo apt-get install -y curl gcc g++
26+
1427
- name: Configure poetry
15-
run: |-
16-
apt update && apt install -y curl gcc g++ && curl -sSL https://install.python-poetry.org | python3 -
28+
run: |
29+
curl -sSL https://install.python-poetry.org | python3 -
1730
export PATH="${PATH}:${HOME}/.local/bin"
1831
echo "${HOME}/.local/bin" >> $GITHUB_PATH
1932
poetry install
33+
env:
34+
YEPCODE_API_TOKEN: ${{ secrets.TEST_YEPCODE_API_TOKEN }}
35+
2036
- name: Run pytest
2137
run: "poetry run pytest"
38+
env:
39+
YEPCODE_API_TOKEN: ${{ secrets.TEST_YEPCODE_API_TOKEN }}
40+
2241
- name: Build
2342
run: "poetry build"

0 commit comments

Comments
 (0)