build.os.tools specific versions #190
This file contains 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: QA | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
python-versions: | |
runs-on: ubuntu-latest | |
outputs: | |
versions: ${{ steps.python-versions.outputs.versions }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Get Python versions | |
id: python-versions | |
run: | | |
CLASSIFIERS="$(yq -p toml -o toml '.project.classifiers[]' pyproject.toml | grep "Programming Language :: Python :: " | grep "\.")" | |
VERSIONS="$(echo "${CLASSIFIERS}" | sed -e 's/Programming Language :: Python :: \([0-9.]*\)$/"\1"/g' | tr '\n' ',' | sed -e 's/,$//g')" | |
echo "versions=[${VERSIONS}]" > "${GITHUB_OUTPUT}" | |
qa: | |
name: Run QA checks | |
runs-on: ubuntu-latest | |
needs: python-versions | |
strategy: | |
matrix: | |
python-version: ${{fromJson(needs.python-versions.outputs.versions)}} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Set up Node.js LTS | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "lts/*" | |
- name: Install the world | |
run: | | |
python -m pip install --upgrade pip setuptools wheel | |
pip install -e .[dev] | |
- name: Run linting | |
run: | | |
flake8 ./pyee ./tests | |
validate-pyproject ./pyproject.toml | |
- name: Run type checking | |
run: | | |
npx pyright@latest | |
- name: Run tests | |
run: pytest ./tests | |
actionlint: | |
name: Run actionlint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Run actionlint | |
uses: raven-actions/actionlint@v2 |