Skip to content

test: Fail on deprecation warnings #622

test: Fail on deprecation warnings

test: Fail on deprecation warnings #622

Workflow file for this run

name: Test template output
on:
pull_request:
paths:
- src/**
- noxfile.py
- .github/workflows/test.yml
- .github/workflows/constraints.txt
- copier.yml
push:
branches:
- 'main'
paths:
- src/**
- noxfile.py
- .github/workflows/test.yml
- .github/workflows/constraints.txt
- copier.yml
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
linting:
env:
FORCE_COLOR: "1"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.12"]
visibility: ["private", "public"]
stream_type: ["REST", "GraphQL"]
auth_method: ["API Key", "Bearer Token", "Basic Auth", "OAuth2", "JWT", "Custom or N/A"]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: .github/workflows/constraints.txt
- name: Upgrade pip
env:
PIP_CONSTRAINT: ${{ github.workspace }}/.github/workflows/constraints.txt
run: |
pip install pip
pip --version
- name: Upgrade pip in virtual environments
shell: python
run: |
import os
import pip
with open(os.environ["GITHUB_ENV"], mode="a") as io:
print(f"VIRTUALENV_PIP={pip.__version__}", file=io)
- name: Install copier
env:
PIP_CONSTRAINT: ${{ github.workspace }}/.github/workflows/constraints.txt
run: |
pipx install copier
copier --version
- name: Install Hatch
env:
PIP_CONSTRAINT: ${{ github.workspace }}/.github/workflows/constraints.txt
run: |
pipx install hatch
hatch --version
- name: Install Nox
env:
PIP_CONSTRAINT: ${{ github.workspace }}/.github/workflows/constraints.txt
run: |
pipx install nox
nox --version
- name: Install pre-commit
env:
PIP_CONSTRAINT: ${{ github.workspace }}/.github/workflows/constraints.txt
run: |
pipx install pre-commit
pre-commit --version
- name: Install dependencies
env:
PIP_ONLY_BINARY: "all"
run: >
nox
--install-only
-s "lint-${{ matrix.python-version }}(visibility='${{ matrix.visibility }}', auth_method='${{ matrix.auth_method }}', stream_type='${{ matrix.stream_type }}')"
- name: Run Nox
env:
PYTHONWARNINGS: "all,error::DeprecationWarning,ignore:pip._vendor"
run: >
nox
--reuse-existing-virtualenvs
--no-install
-s "lint-${{ matrix.python-version }}(visibility='${{ matrix.visibility }}', auth_method='${{ matrix.auth_method }}', stream_type='${{ matrix.stream_type }}')"