base_model, examples: Add write/load methods, add sample JSON #935
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: Python tests | |
on: [push] | |
jobs: | |
run-tests: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [windows-latest, macos-latest, ubuntu-latest] | |
python-version: ["3.10"] | |
defaults: | |
run: | |
shell: bash -l {0} # Required for conda commands. | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- name: Set up Python | |
uses: conda-incubator/setup-miniconda@v2 | |
- name: Install dependencies | |
run: | | |
conda create -n mesmo -c conda-forge python=${{ matrix.python-version }} | |
conda activate mesmo | |
python development_setup.py | |
- name: Run tests with coverage report | |
run: | | |
conda activate mesmo | |
coverage run -m unittest discover tests | |
coverage xml | |
- name: Report coverage to Codecov | |
if: always() | |
continue-on-error: true | |
uses: codecov/codecov-action@v2 | |
- name: Report coverage to Codacy | |
if: always() | |
continue-on-error: true | |
uses: codacy/codacy-coverage-reporter-action@v1 | |
with: | |
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }} | |
coverage-reports: coverage.xml |