Skip to content

ci: fix package name in tests #8

ci: fix package name in tests

ci: fix package name in tests #8

Workflow file for this run

name: CI
on:
push:
branches:
- '*'
pull_request:
branches:
- dev
jobs:
linting:
name: "Linting and formatting checks"
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11"]
steps:
- uses: "actions/checkout@v4"
- uses: "actions/setup-python@v4"
with:
python-version: "${{ matrix.python-version }}"
- name: "Install dependencies"
run: |
python -m pip install --upgrade pip poetry
poetry install
- name: "Run pyupgrade"
run: |
poetry run pre-commit run pyupgrade --all-files
- name: "Run black"
run: |
poetry run pre-commit run black --all-files
- name: "Run ruff"
uses: chartboost/ruff-action@v1
tests:
name: "Python ${{ matrix.python-version}} on ${{ matrix.os }}"
needs: linting
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11"]
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: "actions/checkout@v4"
- uses: "actions/setup-python@v4"
with:
python-version: "${{ matrix.python-version }}"
- name: "Install dependencies"
run: |
python -m pip install --upgrade pip poetry
poetry install
- name: "Run tests"
run: |
poetry run pytest --cov aioelectricitymaps --cov-report xml
- name: "Upload coverage to Codecov"
uses: "codecov/codecov-action@v3"
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}