forked from DIRACGrid/DIRAC
-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (41 loc) · 1.48 KB
/
basic.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
name: Basic tests
on: [push, pull_request]
jobs:
check:
runs-on: ubuntu-latest
if: github.event_name != 'push' || github.repository == 'DIRACGrid/DIRAC'
timeout-minutes: 30
strategy:
fail-fast: False
matrix:
command:
- pytest
- DIRAC_USE_M2CRYPTO=Yes pytest
- pytest Core/Security/test
- DIRAC_USE_M2CRYPTO=Yes pytest Core/Security/test
- .travis.d/checkDocs.sh
# TODO This should cover more than just tests/CI
- find tests/CI -name '*.sh' -print0 | xargs -0 -n1 shellcheck --external-source
- .travis.d/runPylint.sh
- CHECK=pylintPY3K .travis.d/runPylint.sh
- |
if [[ "${REFERENCE_BRANCH}" != "" ]]; then
git remote add upstream https://github.com/DIRACGrid/DIRAC.git
git fetch --no-tags upstream "${REFERENCE_BRANCH}"
git branch -vv
git diff -U0 "upstream/${REFERENCE_BRANCH}" ':(exclude)tests/formatting/pep8_bad.py' | pycodestyle --diff
fi
steps:
- uses: actions/checkout@v1
- name: Prepare environment
run: |
conda env create --name dirac-testing environment.yml
- name: Run linter
run: |
source "${CONDA}/bin/activate"
conda activate dirac-testing
set -euxo pipefail
export PYTHONPATH=${PWD%/*}
${{ matrix.command }}
env:
REFERENCE_BRANCH: ${{ github['base_ref'] || github['head_ref'] }}