Better hardware fix #77
Workflow file for this run
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
name: sharrow testing | |
on: | |
push: | |
branches: [ main, develop ] | |
tags: | |
- 'v[0-9]+.[0-9]+**' | |
pull_request: | |
branches: [ main, develop ] | |
tags: | |
- 'v[0-9]+.[0-9]+**' | |
workflow_dispatch: | |
jobs: | |
test: | |
name: ${{ matrix.os }} py${{ matrix.python-version }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: ["ubuntu-latest", "macos-latest", "windows-latest"] | |
python-version: ["3.9", "3.10"] | |
defaults: | |
run: | |
shell: bash -l {0} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
miniforge-variant: Mambaforge | |
miniforge-version: latest | |
use-mamba: true | |
environment-file: envs/testing.yml | |
python-version: ${{ matrix.python-version }} | |
activate-environment: testing-env | |
auto-activate-base: false | |
auto-update-conda: false | |
- name: Install sharrow | |
run: | | |
python -m pip install -e . | |
- name: Conda checkup | |
run: | | |
conda info -a | |
conda list | |
- name: Lint with Ruff | |
run: | | |
# stop the build if there are Python syntax errors or undefined names | |
ruff check . --select=E9,F63,F7,F82 --statistics | |
# exit-zero treats all errors as warnings. | |
ruff check . --exit-zero --statistics | |
- name: Test with pytest | |
run: | | |
python -m pytest | |
deploy-docs: | |
needs: test | |
# only on pushes tagged with v... | |
if: startsWith(github.ref, 'refs/tags/v') | |
runs-on: ubuntu-latest | |
environment: asim | |
defaults: | |
run: | |
shell: bash -l {0} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.9 | |
- name: Install dependencies | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
miniforge-variant: Mambaforge | |
miniforge-version: latest | |
use-mamba: true | |
environment-file: envs/testing.yml | |
python-version: 3.9 | |
activate-environment: testing-env | |
auto-activate-base: false | |
auto-update-conda: false | |
- name: Install Jupyterbook and ruamel.yaml | |
run: | | |
mamba install jupyter-book ruamel.yaml sphinx-autosummary-accessors -c conda-forge | |
- name: Install sharrow | |
run: | | |
python -m pip install --no-deps -e . | |
- name: Conda checkup | |
run: | | |
conda info -a | |
conda list | |
- name: Install pip build | |
run: | | |
python -m pip install --upgrade build | |
- name: Build wheel | |
run: | | |
python -m build | |
- name: Build the docs | |
run: | | |
python docs/_script/run_all.py | |
jupyter-book build ./docs | |
- name: Push to GitHub Pages | |
uses: peaceiris/[email protected] | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
# Token is created automatically by Github Actions, no other config needed | |
publish_dir: ./docs/_build/html | |
# now send to PyPI | |
- name: Publish to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
if: github.repository_owner == 'ActivitySim' | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_API_TOKEN }} |