Skip to content
This repository has been archived by the owner on Oct 10, 2024. It is now read-only.

Extract package version for docs #30

Extract package version for docs

Extract package version for docs #30

Workflow file for this run

name: Build and run unit tests
on: [push]
jobs:
build:
runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
python-version: ["3.10"]
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Prep
run: pip3 install build
- name: Build
run: python3 -m build
test:
needs: [build]
runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
python-version: ["3.10"]
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install
run: pip3 install -e '.[test]'
- name: Test
run: python3 -m pytest -v --cov=ace tests
flake8:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install flake8
run: pip3 install -e '.[flake8]'
- name: Run flake8
run: |
FAIL_SRC=0
flake8 src || FAIL_SRC=$?
release:
needs: [test, flake8]
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
environment: release
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
strategy:
max-parallel: 4
matrix:
python-version: ["3.10"]
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Prep
run: pip3 install build
- name: Build
run: python3 -m build
- name: Upload package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1