forked from DIRACGrid/DIRAC
-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (45 loc) · 2 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
46
47
48
49
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
# Security tests are flakey due to reference counting bugs in pyGSI/src/crypto/asn1.c
- pytest Core/Security/test || (echo "Retrying..."; pytest Core/Security/test) || (echo "Retrying again..."; pytest Core/Security/test)
- DIRAC_USE_M2CRYPTO=Yes pytest Core/Security/test || (echo "Retrying..."; DIRAC_USE_M2CRYPTO=Yes pytest Core/Security/test) || (echo "Retrying again..."; DIRAC_USE_M2CRYPTO=Yes pytest Core/Security/test)
- tests/checkDocs.sh
# TODO This should cover more than just tests/CI
# Excluded codes related to sourcing files
# SC1090: Can't follow non-constant source
# SC1091: Not following sourced file
- find tests/CI -name '*.sh' -print0 | xargs -0 -n1 shellcheck --exclude=SC1090,SC1091 --external-source
- tests/runPylint.sh
- CHECK=pylintPY3K tests/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 tests
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'] }}