-
-
Notifications
You must be signed in to change notification settings - Fork 89
85 lines (66 loc) · 2.06 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
name: Tests
on:
push:
branches: [ master, ci ]
pull_request:
branches: [ master ]
env:
NUM_WORKERS: 10
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
worker_number: [9, 8, 7, 6, 5, 4, 3, 2, 1, 0]
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- 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 coverage
uses: actions/[email protected]
with:
name: coverage_${{ matrix.worker_number }}
path: coverage_${{ matrix.worker_number }}
- name: Upload test times
uses: actions/[email protected]
with:
name: pikaur_test_times_${{ matrix.worker_number }}
path: pikaur_test_times_${{ 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/[email protected]
with:
path: .
- name: Move files to container location
run: mkdir -p /opt/ ; cd .. ; mv pikaur /opt/app-build ; mkdir pikaur
- name: Install Coveralls
run: python3 -m pip install coveralls
- name: Merge Results
run: |
cd /opt/app-build/ ; coverage combine coverage_*/*
- name: Upload Coverage
run: |
cd /opt/app-build/ ; coveralls --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Show slowest tests
run: |
cd /opt/app-build/ ; \
echo " :: Top 50 of the slowest testcases:" ; \
cat pikaur_test_times_*/* | sort -rn | head -n 50