-
-
Notifications
You must be signed in to change notification settings - Fork 89
71 lines (54 loc) · 1.7 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
67
68
69
70
71
name: Tests
on:
push:
branches: [ master, ci ]
pull_request:
branches: [ master ]
env:
NUM_WORKERS: 20
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
worker_number: [19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0]
steps:
- uses: actions/checkout@v2
- name: switch base image
run: sed -i -e 's|FROM archlinux:base-devel|FROM actionless/pikaur|' Dockerfile
- name: run tests in docker
#run: ./maintenance_scripts/docker_test.sh --coveralls
run: |
./maintenance_scripts/docker_test.sh \
--worker \
$(test ${NUM_WORKERS} -eq $((${{ matrix.worker_number }} + 1)) ; echo $?) \
${{ matrix.worker_number }},${NUM_WORKERS}
- name: Upload result_N.txt
uses: actions/upload-artifact@v3
with:
name: coverage_${{ matrix.worker_number }}
path: coverage_${{ matrix.worker_number }}
merge-results:
name: Merge Coverage Results
runs-on: ubuntu-latest
needs: build
steps:
- name: Set up Python 3.12
uses: actions/setup-python@v2
- uses: actions/checkout@v2
- name: Download all results
uses: actions/download-artifact@v3
with:
path: .
- name: move files to container location
run: mkdir -p /opt/ ; cd .. ; mv pikaur /opt/app-build ; mkdir pikaur ; ls -la /opt/app-build
- name: Install Coveralls
run: python3 -m pip install coveralls
- name: Merge Results
run: |
cd /opt/app-build/ ; ls -la ; coverage combine coverage_*/*
- name: Upload Coverage
run: |
cd /opt/app-build/ ; coveralls --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}