add Experiment manager tools #66
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 dependencies, run tests and the black-formatter | |
name: om3_scripts | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
permissions: | |
contents: read | |
jobs: | |
formatting: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Code formatting | |
uses: psf/black@stable | |
with: | |
options: "--check --verbose --diff" | |
test: | |
needs: formatting | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ['3.10', '3.11', '3.12'] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install sys dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get -y install nco | |
sudo apt-get -y install ncal | |
- name: Install python dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r test/test_requirements.txt | |
- name: Test with pytest | |
run: | | |
python -m pytest -m "not broken" -v -s | |
- name: Upload coverage reports to Codecov with GitHub Action | |
uses: codecov/codecov-action@v3 | |
env: | |
CODEOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |