-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (46 loc) · 1.27 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# 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 }}