-
Notifications
You must be signed in to change notification settings - Fork 11
66 lines (58 loc) · 1.53 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
# This module is part of CAiMIRA. Please see the repository at
# https://gitlab.cern.ch/caimira/caimira for details of the license and terms of use.
name: CI
on:
push:
branches:
- master
- 'feature/*'
pull_request:
branches:
- master
- 'feature/*'
workflow_dispatch:
inputs:
reason:
description: 'Reason'
required: false
default: 'Manual trigger'
jobs:
test-install:
runs-on: ubuntu-latest
env:
PROJECT_ROOT: ./
PROJECT_NAME: caimira
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install ${PROJECT_ROOT}[test]
- name: Run tests
run: |
mkdir -p ~/not-the-source-dir && cd ~/not-the-source-dir
python -m pytest --pyargs ${PROJECT_NAME}
test-dev:
runs-on: ubuntu-20.04
env:
PROJECT_ROOT: ./
PROJECT_NAME: caimira
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install -e ${PROJECT_ROOT}[test]
python -m pip install pytest-cov
- name: Run tests
run: |
cd ${PROJECT_ROOT}
python -m pytest ./${PROJECT_NAME} --cov=${PROJECT_NAME} --junitxml=report.xml