Skip to content

Add strategy matrix to test GitHub Action #2

Add strategy matrix to test GitHub Action

Add strategy matrix to test GitHub Action #2

Workflow file for this run

name: Tests

Check failure on line 1 in .github/workflows/tests.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/tests.yml

Invalid workflow file

(Line: 12, Col: 20): Unexpected value 'false'
on:
workflow_call:
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11", "3.12", "3.13"]
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y curl gcc g++
- name: Configure poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
export PATH="${PATH}:${HOME}/.local/bin"
echo "${HOME}/.local/bin" >> $GITHUB_PATH
poetry install
env:
YEPCODE_API_TOKEN: ${{ secrets.TEST_YEPCODE_API_TOKEN }}
- name: Run pytest
run: "poetry run pytest"
env:
YEPCODE_API_TOKEN: ${{ secrets.TEST_YEPCODE_API_TOKEN }}
- name: Build
run: "poetry build"