Skip to content

Added workflows to test Linux, Windows, and Mac builds. #29

Added workflows to test Linux, Windows, and Mac builds.

Added workflows to test Linux, Windows, and Mac builds. #29

Workflow file for this run

# name: tests-macos
# on:
# push:
# branches: [main]
# pull_request:
# branches: [main]
# workflow_dispatch:
# jobs:
# tests:
# name: '${{ matrix.os }}:python-${{ matrix.python-version }}'
# runs-on: ${{ matrix.os }}
# strategy:
# matrix:
# os: [macos-11, macos-12, macos-13]
# python-version: ['3.6', '3.7', '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: actions/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: |
# python3 -m pip install -U pip
# python3 -m pip install -e .
# python3 -m pip install pytest pytest-cov
# - name: Run tests and generate coverage
# if: steps.install.outcome == 'success'
# shell: bash -l {0}
# run: |
# make test
# - name: Get unique id
# uses: Tiryoh/gha-jobid-action@v1
# id: jobs
# - name: Publish unit test results
# uses: EnricoMi/publish-unit-test-result-action/composite@v2
# if: always()
# with:
# files: |
# test-results/**/*.xml
# test-results/**/*.trx
# test-results/**/*.json
name: tests-macos
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
jobs:
tests:
name: '${{ matrix.os }}:python-${{ matrix.python-version }}'
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-11, macos-12, macos-13]
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
fail-fast: false
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python
id: setup_python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
if: steps.setup_python.outcome == 'success'
run: |
python -m pip install -U pip
python -m pip install -e .
python -m pip install pytest pytest-cov
- name: Run tests
if: steps.setup_python.outcome == 'success'
run: |
make test
# These steps will cause a fail if there is an error during the testing
- name: Upload test results
uses: actions/upload-artifact@v2
with:
name: test-results
path: test-results
- name: Download test results
uses: actions/download-artifact@v2
with:
name: test-results
- name: Get unique id
uses: Tiryoh/gha-jobid-action@v1
id: jobs
- name: Publish unit test results
uses: EnricoMi/publish-unit-test-result-action/composite@v2
if: always()
with:
files: |
test-results/**/*.xml
test-results/**/*.trx
test-results/**/*.json