Testing some updates to workflow to see if it can run any tests #117
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: Pull request checks | |
on: [pull_request] | |
env: | |
cache-version: "cache-v1" | |
jobs: | |
build-environment: | |
strategy: | |
max-parallel: 10 | |
matrix: | |
config: | |
- { python-version: "3.10", os: ubuntu-latest } | |
- { python-version: "3.11", os: ubuntu-latest } | |
- { python-version: "3.12", os: ubuntu-latest } | |
- { python-version: "3.10", os: macos-latest } | |
- { python-version: "3.11", os: macos-latest } | |
- { python-version: "3.12", os: macos-latest } | |
runs-on: ${{ matrix.config.os }} | |
name: Build conda environment | |
steps: | |
- uses: actions/checkout@v4 | |
name: Checkout repository | |
# See: https://github.com/mamba-org/setup-micromamba | |
- name: Setup micromamba | |
uses: mamba-org/setup-micromamba@v2 | |
with: | |
environment-name: nxviz | |
environment-file: environment.yml | |
cache-environment: true | |
cache-downloads: true | |
cache-environment-key: environment-${{ env.cache-version }}-${{ matrix.config.os }} | |
cache-downloads-key: downloads-${{ env.cache-version }}-${{ matrix.config.os }} | |
post-cleanup: "all" | |
create-args: >- | |
python=${{ matrix.config.python-version }} | |
- name: Build environment | |
run: | | |
python -m pip install ".[tests,docs]" | |
python -m ipykernel install --user --name nxviz # setup kernel | |
- name: Test with pytest | |
run: | | |
python -m pytest --cov=nxviz | |
- name: Build docs | |
run: | | |
make docs | |
# https://www.bradmcgonigle.com/blog/github-action-for-continuous-deployment | |
# - NETLIFY_SITE_ID maps to the netlify site's API ID | |
# - NETLIFY_AUTH_TOKEN maps to netlify's Personal Access Token that I set on a per-user basis | |
- name: Deploy to Netlify | |
if: matrix.config.os == 'ubuntu-latest' && matrix.config.python-version == '3.12' | |
uses: netlify/actions/cli@master | |
with: | |
args: deploy --site ${{ secrets.NETLIFY_SITE_ID }} --auth ${{ secrets.NETLIFY_AUTH_TOKEN }} --dir=site/ |