-
Notifications
You must be signed in to change notification settings - Fork 7
98 lines (95 loc) · 2.95 KB
/
Copy pathtests.yml
File metadata and controls
98 lines (95 loc) · 2.95 KB
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
# run test suites
name: Tests
on:
- pull_request
- push
jobs:
# see: https://github.com/fkirc/skip-duplicate-actions
skip_duplicate:
continue-on-error: true
runs-on: ubuntu-latest
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@master
with:
concurrent_skipping: "same_content"
skip_after_successful_duplicate: "true"
do_not_skip: '["pull_request", "workflow_dispatch", "schedule"]'
# see: https://github.com/actions/setup-python
tests:
needs: skip_duplicate
if: ${{ needs.skip_duplicate.outputs.should_skip != 'true' }}
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.allow-failure }}
env:
# override make command to install directly in active python
CONDA_COMMAND: ""
services:
# Label used to access the service container
mongodb:
image: mongo:3.4.23 # DockerHub
ports:
- "27017:27017"
strategy:
matrix:
os: [ubuntu-latest]
python-version: ["3.6", "3.7", "3.8"]
allow-failure: [false]
test-case: [test-unit, test-func]
include:
# linter tests
- os: ubuntu-latest
python-version: 3.7
allow-failure: false
test-case: check
# documentation build
- os: ubuntu-latest
python-version: 3.7
allow-failure: false
test-case: docs
# coverage test
- os: ubuntu-latest
python-version: 3.7
allow-failure: false
test-case: coverage
# smoke test of Docker image
- os: ubuntu-latest
python-version: 3.7 # doesn't matter which one (in docker), but match default of repo
allow-failure: false
test-case: test-docker
# EMS end-2-end Workflow tests
- os: ubuntu-latest
python-version: 3.7
allow-failure: true
test-case: test-workflow
steps:
- uses: actions/checkout@v2
with:
fetch-depth: "0"
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install Dependencies
run: make install-pkg install-dev version
- name: Display Packages
run: pip freeze
#- name: Setup Environment Variables
# uses: c-py/action-dotenv-to-setenv@v2
# with:
# env-file: ./ci/weaver.env
- name: Display Environment Variables
run: |
hash -r
env | sort
- name: Run Tests
run: make stop ${{ matrix.test-case }}
- name: Upload coverage report
uses: codecov/codecov-action@v1
if: ${{ success() && matrix.test-case == 'coverage' }}
with:
files: ./reports/coverage.xml
fail_ci_if_error: true
verbose: true