-
Notifications
You must be signed in to change notification settings - Fork 1
68 lines (60 loc) · 1.89 KB
/
test.yaml
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
name: test
on:
pull_request:
branches:
- '**'
push:
branches:
- 'main'
jobs:
test:
name: test
runs-on: ubuntu-latest
outputs:
epoch: ${{steps.test.outputs.epoch}}
tick: ${{steps.test.outputs.tick}}
status: ${{steps.test.outputs.status}}
color: ${{steps.test.outputs.color}}
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- run: sudo apt-get install -y xsltproc
- run: bun install --verbose
- id: test
run: PEERS="${{secrets.PEERS}}" SEED="${{secrets.SEED}}" bun test-ci.js
badge:
runs-on: ubuntu-latest
needs: test
if: ${{ always() }}
steps:
- name: Create badges dir
run: mkdir -p '.github/badges/'
# Use the output from the `coverage` step
- name: Generate badge svg
uses: emibcn/badge-action@v2.0.3
id: badge
with:
label: "${{needs.test.outputs.epoch}} | ${{needs.test.outputs.tick}}"
status: ${{needs.test.outputs.status}}
color: ${{needs.test.outputs.color}}
path: '.github/badges/test.svg'
- name: Upload badge as artifact
uses: actions/upload-artifact@v4
with:
name: badge
path: '.github/badges/test.svg'
if-no-files-found: error
- uses: actions/checkout@v4
continue-on-error: true
- run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add "./github/badges/test.svg"
git commit -m "Add/Update badge"
git config user.name github-actions
git config user.email github-actions@github.com
git add .
git commit -m "generated test badge"
git push