Update publishing to Conda docs #54
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
# Author - Stuart McAlpine - [email protected] - Jan 2023 | |
name: DESC Example 2 | |
# How does the workflow get triggered? | |
on: | |
# Triggers when push/pull-request made to the main branch. | |
pull_request: | |
branches: | |
- main | |
push: | |
branches: | |
- main | |
# List of jobs for this workflow. | |
jobs: | |
# Our pytest job. | |
ci-with-pytest: | |
# Our strategy lists the OS and Python versions we want to test on. | |
strategy: | |
# Don't quit all jobs if only one job fails. | |
fail-fast: false | |
matrix: | |
python-version: ["3.7","3.8","3.9","3.10"] | |
os: [ubuntu-20.04, ubuntu-latest, macos-latest] | |
experimental: [false] | |
# Test on this, but don't mind if it fails. | |
include: | |
- os: ubuntu-latest | |
python-version: "3.11" | |
experimental: true | |
# If True, do not fail the job, just warn me. | |
continue-on-error: ${{ matrix.experimental }} | |
# What operating system is this job running on? | |
runs-on: ${{ matrix.os }} | |
# Our CI steps for this job. | |
steps: | |
# Check out this repository code. | |
- name: Check out repository code | |
uses: actions/checkout@v3 | |
# Install Python. | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
# Install my package. | |
- name: Install mydescpackage. | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install .[ci] | |
# Do some basic code linting using flake8. Check for syntax and indentation errors. | |
- name: flake8 linting. | |
run: flake8 --count --select=E1,E9 --show-source --statistics ./src/mydescpackage/*.py | |
# Perform the unit tests and output a coverage report. | |
- name: Test with pytest | |
run: pytest --cov=mydescpackage --cov-report xml ./tests | |
# Upload the code coverage results to codecov.io. | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v2 |