forked from w3c/rdf-canon
-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (43 loc) · 1.24 KB
/
generate.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
name: Automatic Report and Test Manifest Generation
on:
push:
branches: [main]
paths: ["reports/**", "tests/**"]
pull_request:
branches: [ main ]
paths: ["reports/**", "tests/**"]
jobs:
build:
name: Generate Reports using Ruby
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.GH_TOKEN }}
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.1
- name: Install dependencies
run: |
bundle install
- name: Generate Test Manifests
run: |
bundle exec tests/mk_manifest.rb
- name: Generate Report
run: |
(cd reports; rake)
- name: setup git config
run: |
msg="Automated report generation"
branch="${{ github.base_ref }}-auto"
git config user.name "Report generation bot"
git config user.email "<>"
git checkout -b $branch
git add tests/index.html
git add tests/manifest*
git add reports/index.html
git add reports/earl.*
git commit -am "$msg"
git push --set-upstream origin $branch
gh pr create -t "$msg" -b "$msg"
gh pr merge $branch --auto --merge