Adjust for improved JSON error messages in Python 3.13 #103
Workflow file for this run
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: CI | |
on: # yamllint disable-line rule:truthy | |
- push | |
- pull_request | |
jobs: | |
unittest: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
container: | |
- debian:bullseye-slim | |
- debian:testing-slim | |
- debian:unstable-slim | |
- ubuntu:focal | |
- ubuntu:jammy | |
yaml_package: | |
- python3-ruamel.yaml | |
- python3-yaml | |
container: | |
image: ${{ matrix.container }} | |
steps: | |
- name: Sanitize container name (for artifact name) | |
run: > | |
container=$(echo "${{ matrix.container }}" | sed 's/:/-/') && | |
echo "JOB=${GITHUB_JOB}-${container}-${{ matrix.yaml_package }}" | |
>> "$GITHUB_ENV" | |
- uses: actions/checkout@v2 | |
- name: Install dependencies | |
run: > | |
apt-get update && | |
apt-get install --no-install-recommends --yes black isort pylint | |
python3 python3-coverage python3-flake8 python3-jinja2 | |
${{ matrix.yaml_package }} | |
- name: Run unit tests | |
run: | | |
python3 -m coverage run -m unittest discover -v | |
python3 -m coverage xml | |
- name: Upload coverage | |
uses: actions/upload-artifact@v4 | |
with: | |
name: coverage-${{ env.JOB }} | |
path: ./coverage*.xml | |
# Debian buster needs pylint3 instead of pylint | |
unittest-debian-buster: | |
name: unittest debian:buster-slim | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
yaml_package: | |
- python3-ruamel.yaml | |
- python3-yaml | |
container: | |
image: debian:buster-slim | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install dependencies | |
run: > | |
apt-get update && | |
apt-get install --no-install-recommends --yes black isort pylint3 | |
python3 python3-flake8 python3-jinja2 ${{ matrix.yaml_package }} | |
- name: Run unit tests | |
run: python3 -m unittest discover -v | |
yamllint: | |
runs-on: ubuntu-latest | |
container: | |
image: debian:testing-slim | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install dependencies | |
run: | | |
apt-get update | |
apt-get install --no-install-recommends --yes yamllint | |
- name: Run yamllint | |
run: | | |
yamllint . | |
upload-to-codecov: | |
if: ${{ always() }} | |
needs: | |
- unittest | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Download artifacts | |
uses: actions/download-artifact@v4 | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
fail_ci_if_error: true |