liionpack #1954
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
# This workflow will install Python dependencies, run tests and lint with a single version of Python | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
name: liionpack | |
on: | |
push: | |
branches: ["develop"] | |
pull_request: | |
schedule: | |
- cron: '0 3 * * *' | |
concurrency: | |
# Skip intermediate builds: always. | |
# Cancel intermediate builds: always. | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
style: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Setup python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.8 | |
- name: Lint with ruff | |
run: | | |
python -m pip install --upgrade pip pre-commit | |
pre-commit run ruff | |
pip-build: | |
needs: style | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.10.x"] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install latex | |
run: | | |
sudo apt-get update | |
sudo apt-get install \ | |
texlive-latex-base \ | |
texlive-latex-extra \ | |
texlive-pictures | |
sudo apt-get install ghostscript | |
- name: Install liionpack and dependencies | |
run: | | |
python -m pip install --upgrade pip wheel coverage | |
python -m pip install . | |
- name: Run tests and generate coverage report | |
run: | | |
coverage run -m unittest -v | |
- name: Build docs | |
run: | | |
python -m pip install -r docs/requirements.txt | |
mkdocs build | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v4.0.1 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
slug: TomTranter/liionpack |