-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (65 loc) · 1.79 KB
/
run-tests.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: Test
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
test:
name: ${{ matrix.test-env }} on ${{ matrix.container }}
strategy:
fail-fast: false
matrix:
test-env:
- prepro
- numerics
- models
- benchmark
- utils
- workflow-single
- workflow-multi
- graphics-mpl
container:
- ghcr.io/oggm/untested_base:20230323
- ghcr.io/oggm/untested_base:py3.11
- ghcr.io/oggm/untested_base:py3.9
include:
- container: python:3.11-slim
test-env: minimal
runs-on: ubuntu-latest
container: ${{ matrix.container }}
continue-on-error: ${{ contains(matrix.container, 'py3') }}
steps:
- name: Install tools
if: ${{ contains(matrix.container, 'slim') }}
run: apt-get -y update && apt-get -y install git curl
- name: Checkout
uses: actions/checkout@v3
- name: Fix Git-Permissions
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Test
run: ./ci/run_tests.sh ${{ matrix.test-env }}
- name: Upload Coverage
if: ${{ !contains(matrix.container, 'py3') }}
continue-on-error: true
env:
GITHUB_TOKEN: ${{ github.token }}
COVERALLS_SERVICE_NAME: github
COVERALLS_PARALLEL: true
run: coveralls
finish-coveralls:
name: Coveralls Finished
needs: test
runs-on: ubuntu-latest
container: python:3.9-slim
continue-on-error: true
steps:
- name: Coveralls Finished
env:
GITHUB_TOKEN: ${{ github.token }}
COVERALLS_SERVICE_NAME: github
run: |
pip3 install --upgrade coveralls &&
coveralls --finish