-
Notifications
You must be signed in to change notification settings - Fork 18
112 lines (93 loc) · 2.67 KB
/
Copy pathtest.yml
File metadata and controls
112 lines (93 loc) · 2.67 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
name: CI
on:
push:
branches:
- master
paths-ignore:
- "**/*.md"
# NOTE: '.github/*.yml' matches only files directly under .github/ (e.g. dependabot.yml).
# Workflow files under .github/workflows/ intentionally trigger CI when edited.
- ".github/*.yml"
pull_request:
paths-ignore:
- "**/*.md"
- ".github/*.yml"
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
defaults:
run:
shell: bash
jobs:
lint-and-unit:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Git Checkout
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- name: Setup Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version-file: .node-version
cache: npm
- run: npm ci
- run: npm run test
- run: npm run dist
- name: Verify committed dist is up to date
run: git diff --exit-code -- dist
build:
needs: lint-and-unit
runs-on: ${{ matrix.os }}
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
os:
- macos-latest
- ubuntu-latest
- windows-latest
haxe:
- latest
- 4.3.7
- 3.4.7
include:
- haxe: 3.4.7
hxml_suffix: _haxe3
- haxe: latest
os: ubuntu-24.04-arm
env:
TEST_LIB_HXML: test-workflow/lib${{ matrix.hxml_suffix }}.hxml
steps:
- name: Git Checkout
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- name: Install Haxe ${{ matrix.haxe }}
uses: ./
with:
haxe-version: ${{ matrix.haxe }}
- name: Re-install Haxe ${{ matrix.haxe }} (idempotency check)
uses: ./
with:
haxe-version: ${{ matrix.haxe }}
cache-dependency-path: ${{ env.TEST_LIB_HXML }}
- name: "Working directory must stay clean after setup (issue #40)"
run: |
dirty="$(git status --porcelain)"
if [ -n "$dirty" ]; then
echo "::error::setup-haxe left files in the working directory (see issue #40):"
echo "$dirty"
exit 1
fi
echo "Working directory is clean after setup-haxe."
- run: neko -version
- run: haxe -version
- run: haxelib install ${{ env.TEST_LIB_HXML }} --always
- name: Compile test code
run: |
haxe \
-cp test-workflow \
-lib hxnodejs \
-main Main \
-js test-workflow.js