-
Notifications
You must be signed in to change notification settings - Fork 5
94 lines (89 loc) · 2.42 KB
/
testing.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
82
83
84
85
86
87
88
89
90
91
92
93
94
name: Testing
on:
push:
branches:
- "main"
pull_request:
branches:
- "*"
jobs:
check_skip:
name: Check CI Skip
runs-on: ubuntu-latest
outputs:
skip: ${{ steps.result_step.outputs.ci-skip }}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- id: result_step
uses: mstachniuk/ci-skip@master
with:
commit-filter: '[skip ci];[ci skip];[skip github]'
commit-filter-separator: ';'
Linting:
name: Running pre-commit
needs: check_skip
if: ${{ needs.check_skip.outputs.skip == 'false' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- name: Set PY variable
run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
- uses: actions/cache@v2
with:
path: ~/.cache/pre-commit
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
- name: Install pre-commit
run: |
pip install pre-commit
pre-commit install
- name: Run pre-commit
run: SKIP=no-commit-to-branch pre-commit run --all-files
Testing:
needs: check_skip
if: ${{ needs.check_skip.outputs.skip == 'false' }}
runs-on: "ubuntu-latest"
name: 'Testing on ubuntu'
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.7'
- name: Install eds-scikit
shell: bash {0}
run: ./build_tools/github/install.sh
- name: Run tests
shell: bash {0}
run: ./build_tools/github/test.sh
- name: Upload coverage to CodeCov
uses: codecov/codecov-action@v3
if: success()
- name: Check dependencies licenses
run: |
liccheck
Documentation:
needs: check_skip
if: ${{ needs.check_skip.outputs.skip == 'false' }}
name: Building documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.7"
- name: Cap pip version
run: pip install -U "pip<23"
- name: Install dependencies
run: pip install .[doc]
- name: Build documentation
run: |
mkdocs build --clean