-
Notifications
You must be signed in to change notification settings - Fork 0
82 lines (79 loc) · 2.51 KB
/
build.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
82
name: Build package
on:
push:
branches:
- main
- develop
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths-ignore:
- "**.md"
- "**.rst"
- "**.ipynb"
branches:
- main
- develop
jobs:
build:
if: github.event.pull_request.draft == false
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest"]
python-version: ["3.10"]
name: Build for ${{ matrix.python-version }}, ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Connect to Container Registry
uses: docker/login-action@v2.1.0
with:
registry: ghcr.io
username: drcandacemakedamoore
password: ${{ secrets.GITHUB_TOKEN }}
- name: Run Tests in Container
run: >
docker run
--rm
-v ${{ github.workspace }}:/ci
-e EIT_PROCESSING_TEST_DATA=/eitprocessing
ghcr.io/eit-alive/eittestdata:latest
sh -c 'set -xe ;
cd /ci ;
python${{ matrix.python-version }} -m pip install ".[dev,publishing]" ;
pytest -v ;
python${{ matrix.python-version }} -m build'
coveralls:
if: github.event.pull_request.draft == false
name: Coveralls build
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest"]
python-version: ["3.10"]
steps:
- uses: actions/checkout@v3
- name: Connect to Container Registry
uses: docker/login-action@v2.1.0
with:
registry: ghcr.io
username: drcandacemakedamoore
password: ${{ secrets.GITHUB_TOKEN }}
- name: Run Tests in Container
run: >
docker run
--rm
-v ${{ github.workspace }}:/ci
-e EIT_PROCESSING_TEST_DATA=/eitprocessing
-e GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
-e COVERALLS_REPO_TOKEN=${{ secrets.COVERALLS_REPO_TOKEN }}
-e COVERALLS_FLAG_NAME=python-${{ matrix.python-version }}
ghcr.io/eit-alive/eittestdata:latest
sh -c 'set -xe ;
cd /ci ;
python${{ matrix.python-version }} -m pip install --upgrade pip setuptools ;
python${{ matrix.python-version }} -m pip install ".[dev,publishing]" ;
pytest --cov --cov-append --cov-report xml --cov-report term --cov-report html ;
coveralls --service=github ;
python${{ matrix.python-version }} -m build'