Added workflows to test Linux, Windows, and Mac builds. #2
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: tests | |
on: | |
push: | |
branches: [master, main] | |
pull_request: | |
branches: [master, main] | |
workflow_dispatch: | |
jobs: | |
tests: | |
name: ${{ matrix.os }}:${{ matrix.python-version }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [macos-11, macos-12, macos-13] | |
python-version: ['3.6', 3.8', '3.9', '3.10', '3.11'] | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python | |
id: setup_python | |
uses: cactions/setup-python@v4 | |
with: | |
activate-environment: vplanet | |
environment-file: environment.yml | |
python-version: ${{ matrix.python-version }} | |
- name: Install | |
id: install | |
if: steps.setup_python.outcome == 'success' | |
shell: bash -l {0} | |
run: | | |
python -m pip install -U pip | |
python -m pip install -e . | |
sudo apt install lcov | |
- name: Run tests and generate coverage | |
if: steps.install.outcome == 'success' | |
shell: bash -l {0} | |
run: | | |
make coverage | |
- name: Get unique id | |
id: unique-id | |
env: | |
STRATEGY_CONTEXT: ${{ toJson(strategy) }} | |
run: | | |
export JOB_ID=`echo $STRATEGY_CONTEXT | md5sum` | |
echo "::set-output name=id::$JOB_ID" | |
- name: Publish unit test results | |
uses: EnricoMi/publish-unit-test-result-action@v1 | |
if: always() | |
with: | |
files: junit/test-*.xml | |
comment_mode: update last | |
- name: CodeCov | |
uses: codecov/codecov-action@v2.1.0 | |
with: | |
files: ./.coverage |