@@ -2,45 +2,48 @@ name: Test
22on :
33 push :
44 branches :
5- - main
5+ - main
66 pull_request :
77jobs :
88 check :
99 name : " Check"
1010 runs-on : ubuntu-latest
1111 steps :
12- - uses : actions/checkout@v6
13- - name : " Check that distribution files are unmodified"
14- if : github.event_name == 'pull_request'
15- run : |
16- if git --no-pager diff --name-only $(git rev-parse origin/${{ github.base_ref }})...${{ github.sha }} | grep -q "^dist/"; then
17- printf "\nThe pull request modifies distribution files, but it shouldn't.\n" &&
18- printf "Please see https://github.com/AssemblyScript/assemblyscript/blob/main/CONTRIBUTING.md\n" &&
19- exit 1;
20- else
21- printf "\nOK: Distributions files have not been modified.\n";
22- fi
12+ - uses : actions/checkout@v6
13+ - uses : actions/setup-node@v6
14+ with :
15+ node-version : ' 24'
16+ - name : " Check that distribution files are unmodified"
17+ if : github.event_name == 'pull_request'
18+ run : |
19+ if git --no-pager diff --name-only $(git rev-parse origin/${{ github.base_ref }})...${{ github.sha }} | grep -q "^dist/"; then
20+ printf "\nThe pull request modifies distribution files, but it shouldn't.\n" &&
21+ printf "Please see https://github.com/AssemblyScript/assemblyscript/blob/main/CONTRIBUTING.md\n" &&
22+ exit 1;
23+ else
24+ printf "\nOK: Distributions files have not been modified.\n";
25+ fi
2326 compiler :
2427 name : " Compiler (${{ matrix.os }}, node ${{ matrix.node_version }})"
2528 runs-on : ${{ matrix.os }}-latest
2629 needs : check
2730 strategy :
2831 matrix :
2932 os : ["ubuntu", "macos", "windows"]
30- node_version : ["current ", "lts/*"]
33+ node_version : ["25 ", "lts/*"]
3134 steps :
32- - uses : actions/checkout@v6
33- - uses : actions/setup-node@v6
34- with :
35- node-version : ${{ matrix.node_version }}
36- - name : Install dependencies
37- run : npm ci --no-audit
38- - name : Build
39- run : npm run build
40- - name : Check
41- run : npm run check
42- - name : Test
43- run : npm test
35+ - uses : actions/checkout@v6
36+ - uses : actions/setup-node@v6
37+ with :
38+ node-version : ${{ matrix.node_version }}
39+ - name : Install dependencies
40+ run : npm ci --no-audit
41+ - name : Build
42+ run : npm run build
43+ - name : Check
44+ run : npm run check
45+ - name : Test
46+ run : npm test
4447 bootstrap :
4548 name : " Bootstrap (${{ matrix.target }})"
4649 runs-on : ubuntu-latest
@@ -49,95 +52,97 @@ jobs:
4952 matrix :
5053 target : ["debug", "release"]
5154 steps :
52- - uses : actions/checkout@v6
53- - uses : actions/setup-node@v6
54- with :
55- node-version : current
56- - name : Install dependencies
57- run : npm ci --no-audit
58- - name : Build
59- run : npm run build
60- - name : " Bootstrap ${{ matrix.target }}"
61- run : npm run bootstrap:${{ matrix.target }}
62- - name : " Test ${{ matrix.target }}"
63- run : npm run test:compiler -- --wasm build/assemblyscript.${{ matrix.target }}-bootstrap.js
64- - name : " Compile ${{ matrix.target }} -> ${{ matrix.target == 'debug' && 'release' || 'debug' }}"
65- run : node bin/asc --config src/asconfig.json --target ${{ matrix.target == 'debug' && 'release' || 'debug' }}-bootstrap --wasm ./build/assemblyscript.${{ matrix.target }}-bootstrap.js
66- - name : " Test ${{ matrix.target == 'debug' && 'release' || 'debug' }}"
67- run : npm run test:compiler -- --wasm build/assemblyscript.${{ matrix.target == 'debug' && 'release' || 'debug' }}-bootstrap.js
55+ - uses : actions/checkout@v6
56+ - uses : actions/setup-node@v6
57+ with :
58+ node-version : current
59+ - name : Install dependencies
60+ run : npm ci --no-audit
61+ - name : Build
62+ run : npm run build
63+ - name : " Bootstrap ${{ matrix.target }}"
64+ run : npm run bootstrap:${{ matrix.target }}
65+ - name : " Test ${{ matrix.target }}"
66+ run : npm run test:compiler -- --wasm build/assemblyscript.${{ matrix.target }}-bootstrap.js
67+ - name : " Compile ${{ matrix.target }} -> ${{ matrix.target == 'debug' && 'release' || 'debug' }}"
68+ run : node bin/asc --config src/asconfig.json --target ${{ matrix.target == 'debug' && 'release' || 'debug' }}-bootstrap --wasm ./build/assemblyscript.${{ matrix.target }}-bootstrap.js
69+ - name : " Test ${{ matrix.target == 'debug' && 'release' || 'debug' }}"
70+ run : npm run test:compiler -- --wasm build/assemblyscript.${{ matrix.target == 'debug' && 'release' || 'debug' }}-bootstrap.js
6871 features :
6972 name : " Features"
7073 runs-on : ubuntu-latest
7174 needs : check
7275 steps :
73- - uses : actions/checkout@v6
74- - uses : actions/setup-node@v6
75- - name : Install dependencies
76- run : npm ci --no-audit
77- - name : Build
78- run : npm run build
79- - name : Test experimental features
80- env :
81- ASC_FEATURES : threads,reference-types,gc,exception-handling
82- run : |
83- npm run test:compiler features/threads features/reference-types features/gc features/exception-handling bindings/esm bindings/raw
76+ - uses : actions/checkout@v6
77+ - uses : actions/setup-node@v6
78+ with :
79+ node-version : ' 24'
80+ - name : Install dependencies
81+ run : npm ci --no-audit
82+ - name : Build
83+ run : npm run build
84+ - name : Test experimental features
85+ env :
86+ ASC_FEATURES : threads,reference-types,gc,exception-handling
87+ run : |
88+ npm run test:compiler features/threads features/reference-types features/gc features/exception-handling bindings/esm bindings/raw
8489 runtimes :
8590 name : " Runtimes"
8691 runs-on : ubuntu-latest
8792 needs : check
8893 steps :
89- - uses : actions/checkout@v6
90- - uses : actions/setup-node@v6
91- with :
92- node-version : current
93- - name : Install dependencies
94- run : npm ci --no-audit
95- - name : Build
96- run : npm run build
97- - name : Test default allocator
98- run : |
99- cd tests/allocators/default
100- npm run build
101- cd ..
102- npm test default
103- - name : Test stub allocator
104- run : |
105- cd tests/allocators/stub
106- npm run build
107- cd ..
108- npm test stub
94+ - uses : actions/checkout@v6
95+ - uses : actions/setup-node@v6
96+ with :
97+ node-version : current
98+ - name : Install dependencies
99+ run : npm ci --no-audit
100+ - name : Build
101+ run : npm run build
102+ - name : Test default allocator
103+ run : |
104+ cd tests/allocators/default
105+ npm run build
106+ cd ..
107+ npm test default
108+ - name : Test stub allocator
109+ run : |
110+ cd tests/allocators/stub
111+ npm run build
112+ cd ..
113+ npm test stub
109114 loader :
110115 name : " Loader"
111116 runs-on : ubuntu-latest
112117 needs : check
113118 steps :
114- - uses : actions/checkout@v6
115- - uses : actions/setup-node@v6
116- with :
117- node-version : current
118- - name : Install dependencies
119- run : npm ci --no-audit
120- - name : Build
121- run : npm run build
122- - name : Test the loader
123- run : |
124- cd lib/loader
125- npm run asbuild
126- npm run test
119+ - uses : actions/checkout@v6
120+ - uses : actions/setup-node@v6
121+ with :
122+ node-version : current
123+ - name : Install dependencies
124+ run : npm ci --no-audit
125+ - name : Build
126+ run : npm run build
127+ - name : Test the loader
128+ run : |
129+ cd lib/loader
130+ npm run asbuild
131+ npm run test
127132 coverage :
128133 name : " Coverage"
129134 runs-on : ubuntu-latest
130135 needs : check
131136 steps :
132- - uses : actions/checkout@v6
133- - uses : actions/setup-node@v6
134- with :
135- node-version : 24
136- - name : Install dependencies
137- run : npm ci --no-audit
138- - name : Build
139- run : npm run build
140- - name : Collect coverage
141- run : npx c8 -r none -- npm test
142- - name : Output coverage summary
143- run : npx c8 report -r text-summary
137+ - uses : actions/checkout@v6
138+ - uses : actions/setup-node@v6
139+ with :
140+ node-version : 24
141+ - name : Install dependencies
142+ run : npm ci --no-audit
143+ - name : Build
144+ run : npm run build
145+ - name : Collect coverage
146+ run : npx c8 -r none -- npm test
147+ - name : Output coverage summary
148+ run : npx c8 report -r text-summary
0 commit comments