-
-
Notifications
You must be signed in to change notification settings - Fork 37
93 lines (76 loc) · 2.36 KB
/
Copy pathreusable.init-tests.yml
File metadata and controls
93 lines (76 loc) · 2.36 KB
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
87
88
89
90
91
92
93
on:
workflow_call:
inputs:
os:
required: true
type: string
concurrency:
group: tests-entry-os-${{ inputs.os }}-${{ github.ref }}
cancel-in-progress: true
env:
NODE_VERSION: 22
BUN_VERSION: "1.3.11"
jobs:
suite:
runs-on: ${{ inputs.os }}
name: ${{ inputs.os }}
steps:
- name: Checkout
uses: actions/checkout@v6
- uses: oven-sh/setup-bun@v2
name: Install bun
with:
bun-version: ${{ env.BUN_VERSION }}
- name: Install Node.js
uses: actions/setup-node@v6
with:
node-version: ${{ env.NODE_VERSION }}
- name: Install dependencies
run: bun install
- name: Build packages
run: bun run build
- name: Run tests
run: bun run test
- name: Deploy CLI locally
run: bun run scripts/deploy.ts ./packages/cli ./bati-cli
- name: Archive Bati CLI
uses: actions/upload-artifact@v7
with:
name: bati-cli-${{ inputs.os }}-${{ env.NODE_VERSION }}
if-no-files-found: error
retention-days: 1
overwrite: true
include-hidden-files: true
path: ./bati-cli/*
- name: Deploy tests locally
run: bun run scripts/deploy.ts ./packages/tests ./bati-tests
- name: Archive Bati tests
uses: actions/upload-artifact@v7
with:
name: bati-tests-${{ inputs.os }}-${{ env.NODE_VERSION }}
if-no-files-found: error
retention-days: 1
overwrite: true
include-hidden-files: true
path: ./bati-tests/dist/*
- name: Pack tests-utils
run: bun pm pack
working-directory: ./packages/tests-utils
- name: Archive tests-utils
uses: actions/upload-artifact@v7
with:
name: tests-utils-${{ inputs.os }}-${{ env.NODE_VERSION }}
if-no-files-found: error
retention-days: 1
overwrite: true
include-hidden-files: true
path: ./packages/tests-utils/batijs-tests-utils-*.tgz
- name: Archive tests files
uses: actions/upload-artifact@v7
with:
name: tests-files-${{ inputs.os }}-${{ env.NODE_VERSION }}
if-no-files-found: error
retention-days: 1
overwrite: true
include-hidden-files: true
path: ./packages/tests/tests/*