-
Notifications
You must be signed in to change notification settings - Fork 7
81 lines (73 loc) · 2.35 KB
/
ee2-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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# This workflow will install Python dependencies, run tests and lint
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Execution Engine 2 Test Suite
on:
[ pull_request ]
jobs:
Lint_with_Black:
runs-on: ubuntu-latest
name: Lint With Black
steps:
- uses: actions/checkout@v4
- uses: psf/black@stable
with:
options: "--check --verbose"
src: "./lib"
version: "22.10.0"
- uses: psf/black@stable
with:
options: "--check --verbose"
src: "./test"
version: "22.10.0"
Lint_with_Flake8:
runs-on: ubuntu-latest
name: Lint With Flake8
steps:
- name: Check out source repository
uses: actions/checkout@v4
- name: Set up Python environment
uses: actions/setup-python@v5
with:
python-version: "3.10.14"
- name: flake8 Lint Lib
uses: py-actions/flake8@v2
with:
path: "./lib"
- name: flake8 Lint Test
uses: py-actions/flake8@v2
with:
path: "./test"
Build_and_Run_Tests_and_CodeCov:
name: Build and Run Tests and CodeCov
runs-on: ubuntu-latest
strategy:
matrix:
mongo-config:
- version: "7.0"
init-path: "./test/dockerfiles/mongo/docker-entrypoint-initdb.d-7.0/"
- version: "3.6"
init-path: "./test/dockerfiles/mongo/docker-entrypoint-initdb.d-3.6/"
steps:
- name: Check out source repository
uses: actions/checkout@v4
- name: Set up Python environment
uses: actions/setup-python@v5
with:
python-version: "3.10.14"
- name: Install dependencies
run: |
pip install -r requirements.txt
git clone https://github.com/kbase/jars /opt/jars
- name: Set MongoDB Version and Init Path
run: |
echo "MONGO_VERSION=${{ matrix.mongo-config.version }}" >> $GITHUB_ENV
echo "INIT_PATH=${{ matrix.mongo-config.init-path }}" >> $GITHUB_ENV
- name: Start Services and Run Tests
run: |
docker compose up -d
cp test/env/test.travis.env test.env
make test-coverage
codecov --token="${{ secrets.CODECOV_TOKEN }}"
- name: Cleanup
run: |
docker compose down