Skip to content

test

test #751

Workflow file for this run

name: test
on:
workflow_dispatch:
push:
pull_request:
schedule:
- cron: "0 8 * * *"
jobs:
pre-commit:
name: pre-commit
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pre-commit
pre-commit install
- name: Run pre-commit
run: pre-commit run --all-files
test:
name: test ${{ matrix.py }} - ${{ matrix.netapi }} - ${{ matrix.salt }}
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
py:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
netapi:
- "cherrypy"
- "tornado"
salt:
- "v3006.9"
- "v3007.1"
- "master"
exclude:
- py: "3.8"
salt: "v3007.1"
- py: "3.9"
salt: "v3007.1"
- py: "3.8"
salt: "master"
- py: "3.9"
salt: "master"
env:
SALT_REQUIREMENT: ${{ matrix.salt == 'master' && 'salt@git+https://github.com/saltstack/salt.git@master' || format('salt=={0}', matrix.salt) }}
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.py }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.py }}
- name: Install setuptools_scm
run: python -m pip install setuptools_scm
- name: Install dependencies
run: sudo apt update && sudo apt install -y libc6-dev libffi-dev gcc git openssh-server libzmq3-dev
env:
DEBIAN_FRONTEND: noninteractive
- name: Install Nox
run: |
python -m pip install --upgrade pip
pip install nox
- name: Install Test Requirements
env:
PYTHON_VERSIONS: ${{ matrix.py }}
API_BACKEND: ${{ matrix.netapi }}
run: |
nox --force-color -e tests --install-only
- name: Test
env:
PYTHON_VERSIONS: ${{ matrix.py }}
API_BACKEND: ${{ matrix.netapi }}
SKIP_REQUIREMENTS_INSTALL: YES
run: |
nox --force-color -e tests -- -vv tests/