-
Notifications
You must be signed in to change notification settings - Fork 2
73 lines (61 loc) · 2.07 KB
/
sample-test.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
name: gems-test
on:
workflow_call:
inputs:
private-fonts:
default: 'false'
required: false
type: string
secrets:
pat_token:
required: false
jobs:
test:
name: Test on Ruby ${{ matrix.ruby }}
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.experimental }}
concurrency:
group: '${{ github.workflow }}-${{ matrix.os }}-${{ matrix.ruby }}-${{ github.head_ref || github.ref_name }}'
cancel-in-progress: true
strategy:
fail-fast: false
max-parallel: 5
matrix:
ruby: [ '3.1', '3.2', '3.3', '3.4' ]
os: [ ubuntu-latest, windows-latest, macos-latest ]
experimental: [ false ]
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.pat_token || github.token }}
submodules: true
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- if: ${{ inputs.private-fonts == 'true' }}
run: |
bundle exec fontist update
bundle exec fontist repo setup metanorma https://metanorma-ci:${{ secrets.pat_token }}@github.com/metanorma/fontist-formulas-private
bundle exec fontist repo update metanorma
- uses: actions/setup-python@v4
with:
python-version: '3.6'
- run: pip install xml2rfc
- name: install metanorma
shell: python
env:
TRIGGER_REPO: ${{ github.event.client_payload.repo }}
TRIGGER_REF: ${{ github.event.client_payload.ref }}
# TODO convert to composite action
run: |
import os
repo = os.environ.get("TRIGGER_REPO")
branch = os.environ.get("TRIGGER_REF")
print("Install {} {}".format(repo, branch))
if repo != "metanorma/metanorma-cli":
os.system("gem install metanorma-cli")
os.system("gem install specific_install")
os.system("gem specific_install -l https://github.com/{}.git -b {}".format(repo, branch))
- uses: actions-mn/site-gen@main
with:
agree-to-terms: true