-
Notifications
You must be signed in to change notification settings - Fork 0
86 lines (71 loc) · 2.02 KB
/
validation.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
86
name: validation
on:
push:
schedule:
- cron: "0 0 * * *"
jobs:
setup:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Set up Python 3
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install dependencies
run: pip install -r requirements.txt
- id: set-matrix
run: echo "matrix=$(python -c 'import runner; runner.matrix()')" >> $GITHUB_OUTPUT
- name: Cache pip directory
uses: actions/cache@v3
id: cache
with:
path: ~/.cache/pip
key: ${{ github.sha }}
validate:
needs: setup
runs-on: ubuntu-latest
continue-on-error: true
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
strategy:
fail-fast: false
matrix:
gem: ${{ fromJSON(needs.setup.outputs.matrix) }}
max-parallel: 1
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Set up Python 3
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Restore pip cache directory
uses: actions/cache@v3
id: cache
with:
path: ~/.cache/pip
key: ${{ github.sha }}
- name: Install dependencies
run: pip install -r requirements.txt
- name: Validate repository
run: python -c 'import runner; runner.validate("${{ matrix.gem }}")'
- name: Update branch
run: git pull --ff
- name: Auto-commit results
uses: stefanzweifel/[email protected]
with:
commit_user_name: validation-bot
commit_message: update validation results for ${{ matrix.gem }}
file_pattern: results/*.json
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}