Skip to content

test

test #273

Workflow file for this run

name: Tests
on:
pull_request:
push:
branches:
- main
jobs:
linters:
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install python packages and dependencies
run: |
pip install -U .[dev]
- name: Run black
run: |
make test-black
- name: Run codespell
run: |
make test-codespell
- name: Run flake8
run: |
make test-flake8
- name: Run isort
run: |
make test-isort
- name: Run mypy
run: |
make test-mypy
- name: Run pydocstyle
run: |
make test-pydocstyle
- name: Run pyright
run: |
sudo snap install --classic node
sudo snap install --classic pyright
make test-pyright
tests:
strategy:
matrix:
os: [macos-12, ubuntu-20.04, ubuntu-22.04, windows-2019]
python-version: ["3.8", "3.9", "3.10"]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }} on ${{ matrix.os }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install -U .[dev]
pip install -e .
- name: Run unit tests
run: |
make test-units
- name: Run integration tests
env:
CRAFT_STORE_CHARMCRAFT_CREDENTIALS: ${{ secrets.CRAFT_STORE_CHARMCRAFT_CREDENTIALS }}
run: |
make test-integrations