more solvers to register #120
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
on: | |
push: | |
pull_request: | |
name: Build | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
build: | |
name: Build tool | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: | |
- "ubuntu-latest" | |
- "windows-latest" | |
python-version: | |
- "3.7" | |
- "3.8" | |
- "3.9" | |
steps: | |
- name: Checkout code | |
uses: actions/[email protected] | |
- name: Setup Python | |
uses: actions/[email protected] | |
with: | |
python-version: ${{matrix.python-version}} | |
- name: Setup ffmpeg | |
uses: FedericoCarboni/setup-ffmpeg@v1 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
id: setup-ffmpegs | |
- name: Cache Poetry | |
id: cache-poetry | |
uses: actions/[email protected] | |
with: | |
path: ~/.poetry | |
key: ${{ matrix.os }}-poetry | |
- name: Install latest version of Poetry | |
if: steps.cache-poetry.outputs.cache-hit != 'true' | |
run: | | |
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python - | |
- name: Add Poetry to $PATH | |
run: | | |
echo "$HOME/.poetry/bin" >> $GITHUB_PATH | |
- name: Get Poetry version | |
run: poetry --version | |
- name: Check pyproject.toml validity | |
run: poetry check --no-interaction | |
- name: Cache dependencies | |
id: cache-deps | |
uses: actions/[email protected] | |
with: | |
path: ${{github.workspace}}/.venv | |
key: ${{ matrix.os }}-${{ hashFiles('**/poetry.lock') }} | |
restore-keys: ${{ matrix.os }}- | |
- name: Install deps | |
if: steps.cache-deps.cache-hit != 'true' | |
run: | | |
poetry config virtualenvs.in-project true | |
poetry install --no-interaction | |
- name: Install package | |
run: poetry install | |
- name: Check code formatting | |
run: poetry run black attractors/ tests/ --check | |
- name: Check imports | |
run: poetry run isort attractors/ tests/ --check | |
- name: Check linting | |
run: poetry run flake8 attractors/ tests/ | |
- name: Generate coverage report | |
run: poetry run pytest --cov=attractors --cov-report=xml | |
- if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.8' | |
name: Upload coverage | |
uses: codecov/codecov-action@v2 | |
with: | |
file: ./coverage.xml | |
fail_ci_if_error: true | |
verbose: true | |
- name: Build artifacts | |
id: build-status | |
run: poetry build |