-
Notifications
You must be signed in to change notification settings - Fork 13
154 lines (139 loc) · 3.87 KB
/
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
name: Tests
on:
push:
paths-ignore:
- docs/requirements.txt
- examples/**
- .github/workflows/appimage.yml
jobs:
Linux:
runs-on: ubuntu-latest
container:
image: docker://jcolley/grand:0.4
steps:
- uses: actions/checkout@v2
- name: Initialise the environment
run: |
echo $USR
echo $PWD
echo $SHELL
ls -la
source env/setup.sh
python -m pip install -r quality/requirements.txt
quality/ci/coverage_if_necessary.bash
shell: bash
- name: Check SonarQube update
env:
USER_GIT: ${{github.actor}}
SONAR_L: ${{secrets.SONAR_TOKEN}}
run: |
pwd
ls -la
. env/test.sh $PWD
quality/ci/manage_sonar_update.py "$SONAR_L"
. quality/ci/apply_sonar_update.bash
- name: Dynamics analysis and coverage
run: |
. env/setup.sh
quality/ci/coverage_if_necessary.bash
check_score_coverage.py
- name: Static analysis with pylint
run: |
. env/setup.sh
grand_quality_analysis.bash
- name: Static type check
run: |
. env/setup.sh
grand_quality_type.bash
# - name: Check documentation examples
# run: |
# . env/setup_AppImage.sh
# python -m tests --doc
# - name: Upload the coverage
# if: github.ref == 'refs/heads/master'
# uses: codecov/codecov-action@v1
# - name: Build wheels
# if: github.ref == 'refs/heads/master'
# run: |
# ./wheel/build-linux-wheel.sh cp38-cp38 x86_64
# ./wheel/build-linux-wheel.sh cp38-cp38 i686
# rm -rf dist
# mkdir dist
# mv wheel/*.whl dist
- uses: actions/setup-python@v1
with:
python-version: '3.8'
# - name: Test wheel
# run: |
# mv grand .grand
# pip3 install dist/grand-*_x86_64.whl
# python3 -m tests --unit
# mv .grand grand
# - name: Upload to PyPI
# if: github.ref == 'refs/heads/master'
# uses: pypa/gh-action-pypi-publish@master
# with:
# password: ${{ secrets.PYPI_TOKEN }}
# OSX:
# runs-on: macOS-latest
# env:
# PYTHONPATH: ${{ github.workspace }}/lib/python
# steps:
# - uses: actions/checkout@v2
# - uses: actions/setup-python@v1
# with:
# python-version: '3.8'
#
# - name: Install
# run: |
# pip3 install -U pip
# pip3 install -U -r requirements.txt
# make install PYTHON=$(which python3)
#
# - name: Check documentation examples
# run: python3 -m tests --doc
#
# - name: Run unit tests
# run: python3 -m tests --unit
# Documentation:
# runs-on: ubuntu-latest
# needs: Linux
# if: github.ref == 'refs/heads/master'
# steps:
# - uses: actions/checkout@v2
# - uses: actions/checkout@v2
# with:
# repository: grand-mother/grand-docs
# path: docs/build/html
# persist-credentials: false
# fetch-depth: 0
#
# - name: Build
# run: |
# . env/setup.sh
#
# cd docs/build/html
# git config user.email "[email protected]"
# git config user.name "GitHub Action"
#
# cd ../..
# make html
#
# if [[ ! -f "build/html/.nojekyll" ]]; then
# touch "build/html/.nojekyll"
# fi
#
# cd build/html
# if [[ ! -z "$(git status --porcelain)" ]]; then
# git add "."
# git commit -a --amend --message "Update the docs"
# fi
# cd ../../..
#
# - name: Push
# uses: ad-m/github-push-action@master
# with:
# directory: docs/build/html
# repository: grand-mother/grand-docs
# github_token: ${{ secrets.PERSONAL_TOKEN }}
# force: true