-
Notifications
You must be signed in to change notification settings - Fork 2
executable file
·49 lines (46 loc) · 1.63 KB
/
on-pull-request.yaml
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
name: Automated scripts
on:
push:
branches:
- main
- develop
- 'feature/**'
- 'hotfix/**'
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10.6']
steps:
- name: Checkout head
uses: actions/[email protected]
with:
fetch-depth: 2
run: git checkout HEAD^
- name: Set up Python ${{ matrix.python-version }}
uses: actions/[email protected]
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
pip3 install flake8==6.0.0 wheel==0.38.4 pytest==7.2.1
pip3 install -r requirements.txt
echo "dummytoken" > /home/runner/work/.dnanexus_auth_token
echo "dummypw" > /home/runner/work/.amazon_email_pw
echo "dummyuser" > /home/runner/work/.amazon_email_username
- name: Lint with flake8
run: |
# stop the build if there are:
# - syntax errors (E9)
# - common assertion and comparison gotchas (F63)
# - control flow gotchas (F7)
# - undefined names (F82)
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=120 --statistics
- name: Test with pytest
# We do not want it to run the email tests because the credentials are not stored in GitHub
run: |
python3 -m pytest -k 'not email and not wscleaner'