Skip to content

ci: add least-privilege permissions and pin softprops/action-gh-release #149

ci: add least-privilege permissions and pin softprops/action-gh-release

ci: add least-privilege permissions and pin softprops/action-gh-release #149

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Run tests
on:
push:
branches: [ master ]
pull_request:
jobs:
build:
runs-on: ${{ matrix.os }}
timeout-minutes: 20
permissions:
contents: read
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest] # TODO: Add windows-latest after python-magic is fixed
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@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-dev.txt
pip install -r tests/requirements.txt
python -m nltk.downloader averaged_perceptron_tagger_eng
python -m nltk.downloader punkt_tab
- name: Run static analysis lint
uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1
- name: Run pytest
shell: bash
run: |
export PYTHONPATH=.
pytest tests/pipelines/