Skip to content

OM3 user scripts

OM3 user scripts #5

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
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"
build:
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 nco
run: |
sudo apt-get update
sudo apt-get -y install nco
- 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"
- name: Upload coverage reports to Codecov with GitHub Action
uses: codecov/codecov-action@v3
env:
CODEOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}