-
-
Notifications
You must be signed in to change notification settings - Fork 16
81 lines (69 loc) · 2.18 KB
/
tests-generated.reusable.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
# Step 3
on:
workflow_call:
inputs:
entry:
required: true
type: string
os:
required: true
type: string
node:
required: true
type: number
jobs:
reusable_workflow_job:
runs-on: ${{ inputs.os }}
env:
BATI_TEST: true
TEST_AUTH0_CLIENT_ID: ${{ secrets.TEST_AUTH0_CLIENT_ID }}
TEST_AUTH0_ISSUER_BASE_URL: ${{ secrets.TEST_AUTH0_ISSUER_BASE_URL }}
TEST_FIREBASE_ACCOUNT: ${{ secrets.TEST_FIREBASE_ACCOUNT }}
TEST_GITHUB_CLIENT_ID: ${{ secrets.TEST_GITHUB_CLIENT_ID }}
TEST_GITHUB_CLIENT_SECRET: ${{ secrets.TEST_GITHUB_CLIENT_SECRET }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ inputs.node }}
- name: Cache for Turbo
uses: rharkor/[email protected]
- uses: oven-sh/setup-bun@v2
name: Install bun
with:
bun-version: "1.1.43"
- name: Download Bati CLI
uses: actions/download-artifact@v4
with:
name: bati-cli-${{ inputs.os }}-${{ inputs.node }}
path: ./bati-cli
- name: Download Bati tests
uses: actions/download-artifact@v4
with:
name: bati-tests-${{ inputs.os }}-${{ inputs.node }}
path: ./bati-tests
- name: Download tests-utils
uses: actions/download-artifact@v4
with:
name: tests-utils-${{ inputs.os }}-${{ inputs.node }}
path: ./bati-tests-utils
- name: Download tests-files
uses: actions/download-artifact@v4
with:
name: tests-files-${{ inputs.os }}-${{ inputs.node }}
path: ./bati-tests-files
- name: Generate dynamic composite action
run: node ./scripts/gen-composite-workflow-action.js '${{ inputs.entry }}'
# Step 4
- name: Run all tests
id: gen
uses: ./.github/actions/bati-gen
with:
os: ${{ inputs.os }}
node: ${{ inputs.node }}
- name: Cleanup
if: always() && steps.gen.outcome != 'success'
shell: bash
run: rm -rf ./.github/actions/bati-gen