-
Notifications
You must be signed in to change notification settings - Fork 0
140 lines (118 loc) · 4.48 KB
/
Copy pathexamples.yml
File metadata and controls
140 lines (118 loc) · 4.48 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
name: Example Compilation Tests
on:
workflow_call:
workflow_dispatch:
permissions:
contents: read
env:
NODE_VERSION: '22.14.0'
HAXE_VERSION: '4.3.7'
ELIXIR_VERSION: '1.18.3'
OTP_VERSION: '27.2'
jobs:
examples:
name: Compile-check examples (quick)
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Setup Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'
- name: Cache Haxe toolchain (lix)
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
with:
path: |
~/haxe
key: ${{ runner.os }}-lix-haxe-${{ env.HAXE_VERSION }}-${{ hashFiles('.haxerc', 'haxe_libraries/*.hxml', 'package-lock.json') }}
restore-keys: |
${{ runner.os }}-lix-haxe-${{ env.HAXE_VERSION }}-
- name: Install npm dependencies
run: npm ci --ignore-scripts --no-audit --no-fund
- name: Install Haxe (pinned via lix)
run: |
set -euo pipefail
npx lix download
npx lix download haxe "${{ env.HAXE_VERSION }}"
npx lix use haxe "${{ env.HAXE_VERSION }}"
echo "$(pwd)/node_modules/.bin" >> "$GITHUB_PATH"
export PATH="$(pwd)/node_modules/.bin:$PATH"
haxe -version
- name: Download Haxe libraries (lix)
run: npx lix download
- name: Compile-check examples and expected output
run: npm run test:examples-output
- name: Check examples QA manifest
run: npm run guard:examples-qa
examples-runtime:
name: Runtime-check examples
runs-on: ubuntu-latest
timeout-minutes: 45
services:
postgres:
image: postgres:16
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U postgres -d postgres"
--health-interval 10s
--health-timeout 5s
--health-retries 10
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Setup Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'
- name: Setup Erlang/Elixir
uses: erlef/setup-beam@54075bcc5e249e4758d363f27d099f55d843f124 # v1.24.1
with:
otp-version: ${{ env.OTP_VERSION }}
elixir-version: ${{ env.ELIXIR_VERSION }}
- name: Cache Mix deps
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
with:
path: |
~/.mix
~/.hex
examples/*/deps
examples/*/_build
key: ${{ runner.os }}-examples-runtime-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ hashFiles('examples/**/mix.lock') }}
restore-keys: |
${{ runner.os }}-examples-runtime-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-
- name: Cache Haxe toolchain (lix)
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
with:
path: |
~/haxe
key: ${{ runner.os }}-lix-haxe-${{ env.HAXE_VERSION }}-${{ hashFiles('.haxerc', 'haxe_libraries/*.hxml', 'package-lock.json') }}
restore-keys: |
${{ runner.os }}-lix-haxe-${{ env.HAXE_VERSION }}-
- name: Install npm dependencies
run: npm ci --ignore-scripts --no-audit --no-fund
- name: Install Haxe (pinned via lix)
run: |
set -euo pipefail
npx lix download
npx lix download haxe "${{ env.HAXE_VERSION }}"
npx lix use haxe "${{ env.HAXE_VERSION }}"
echo "$(pwd)/node_modules/.bin" >> "$GITHUB_PATH"
export PATH="$(pwd)/node_modules/.bin:$PATH"
haxe -version
- name: Download Haxe libraries (lix)
run: npx lix download
- name: Run example runtime tests
run: npm run test:examples-runtime
- name: Verify handwritten-output quality corpus
run: npm run test:handwritten-output
- name: Verify generated Phoenix formatting lifecycle
run: npm run test:generated-formatting -- --example examples/15-phoenix-chat-haxe-first --require-liveview-formatter