-
Notifications
You must be signed in to change notification settings - Fork 1
81 lines (63 loc) · 1.79 KB
/
main.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
name: alpenhorn-ci-build
on:
pull_request:
branches:
- master
push:
branches:
- master
jobs:
lint-code:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.11
uses: actions/setup-python@v1
with:
python-version: "3.11"
- name: Install pip dependencies
run: |
pip install flake8 pytest black
pip install -r requirements.txt
python setup.py develop
# - name: Run flake8
# run: flake8 --show-source --ignore=E501,E741,E203,W503,E266 caput
- name: Check code with black
run: black --check .
run-tests:
strategy:
matrix:
python-version: ["3.10", "3.11"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install pip dependencies
run: |
pip install -r requirements.txt
pip install -r test-requirements.txt
python setup.py develop
- name: Run serial tests
run: pytest -v tests/
# run-docker-tests:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# - name: Set up Python 3.9
# uses: actions/setup-python@v1
# with:
# python-version: 3.9
# - name: Install pip dependencies
# run: |
# pip install -r requirements.txt
# pip install -r test-requirements.txt
# python setup.py develop
# - name: Build docker image
# run: docker build -f tests/docker/Dockerfile.alpenhorn -t alpenhorn .
# - name: Run docker tests
# run: pytest tests/docker/test_docker.py
# env:
# RUN_DOCKER_TESTS: true