Add strategy matrix to test GitHub Action #2
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Tests | ||
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" |