Skip to content

Workflow file for this run

name: Run Python tests
on: push
jobs:
test:
name: Run tests (setup-python)
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.x
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install dependencies
run: |
pip install pytest pytest-md pytest-emoji
- uses: ./.
test-issue:
runs-on: "ubuntu-latest"
strategy:
matrix:
python-version: ["3.12", "3.11", "3.10", "3.9"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
set -x
python3 -m pip install --upgrade pip
pip3 install pytest pytest-emoji pytest-md
# if [ -f requirements.txt ]; then pip3 install -r requirements.txt; fi
which pytest
- name: Test code with pytest
uses: pavelzw/pytest-action@v2
with:
emoji: true
verbose: false
job-summary: true
quotes:
name: Test quotes
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.x
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install dependencies
run: |
pip install pytest pytest-md pytest-emoji
- uses: ./.
with:
custom-arguments: -k "not failed"
test-micromamba:
name: Run tests (setup-micromamba)
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up micromamba environment
uses: mamba-org/setup-micromamba@v1
with:
environment-name: myenv
cache-environment: true
create-args: >-
python
pytest
pytest-md
pytest-emoji
- uses: ./.