Skip to content

Refactor to provide clearer template project #40

Refactor to provide clearer template project

Refactor to provide clearer template project #40

Workflow file for this run

name: ci-testing
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
pytest:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install the package & requirements
run: |
python -m pip install --upgrade pip
(cd plugin_template && python -m pip install .[dev])
- name: Run the test suite \w coverage
if: contains(matrix.python-version, '3.12')
run: cd plugin_template && pytest --cov=aiidalab_alc --cov-report xml:coverage.xml
- name: Run the test suite without coverage
if: ${{ !contains(matrix.python-version, '3.12') }}
run: cd plugin_template && pytest
- name: Report coverage to Coveralls
if: contains(matrix.python-version, '3.12')
uses: coverallsapp/github-action@v2
with:
file: plugin_template/coverage.xml
base-path: aiidalab_alc
style-check:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Setup up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install ruff
run: pip install ruff
- name: Run the linter
run: cd plugin_template && ruff check
- name: Run the format checker
run: cd plugin_template && ruff format --check