DOC: Add CHANGELOG file to track changes in the project #149
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
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
name: tests | |
on: | |
push: | |
branches: [ 'main' ] | |
pull_request: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.number }}-${{ github.event.ref }} | |
cancel-in-progress: true | |
jobs: | |
linting: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: 3.11 | |
- name: Install mypy | |
run: | | |
python -m pip install mypy numpy | |
mypy pymsis | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [windows-latest, ubuntu-latest, macos-latest, macos-14] | |
python-version: ['3.10', '3.11', '3.12', '3.13', '3.13t'] | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- uses: actions/checkout@v3 | |
# sets up the compiler paths automatically for us | |
- uses: fortran-lang/setup-fortran@v1 | |
id: setup-fortran | |
with: | |
compiler: gcc | |
version: 13 | |
- name: Compiler versions | |
run: | | |
which gcc | |
gcc --version | |
which gfortran | |
gfortran --version | |
# On Windows, the compilers can cause issues when | |
# using higher optimization levels | |
- name: Add Windows environment settings | |
if: startsWith(matrix.os, 'windows') | |
run: | | |
echo "FFLAGS=-O1" >> $GITHUB_ENV | |
# Windows can't decode the README which has utf8 characters | |
echo "PYTHONUTF8=1" >> $GITHUB_ENV | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: Quansight-Labs/setup-python@b9ab292c751a42bcd2bb465b7fa202ea2c3f5796 # v5.3.1 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Download source files | |
run: | | |
python .github/workflows/download_mirror.py | |
- name: Install pymsis | |
run: | | |
python -m pip install --upgrade pip | |
# TODO: Remove meson installation from source once a new release | |
# that includes https://github.com/mesonbuild/meson/pull/13851 is available | |
python -m pip install git+https://github.com/mesonbuild/meson | |
python -m pip install ninja meson-python setuptools_scm numpy | |
python -m pip install --no-build-isolation -v .[test] | |
- name: Test with pytest | |
run: | | |
# TODO: Get coverage for other modules without specifying pymsis.msis directly | |
pytest --color=yes --cov=pymsis.msis --cov pymsis.utils --cov-report=xml --pyargs pymsis | |
- name: Upload code coverage | |
uses: codecov/codecov-action@v3 |