Skip to content

Commit 5c2c54e

Browse files
authored
feat(ci): add test matrix for CI workflow, fix docs, fix arch mapping + include arm64 (#87)
* add test matrix from #85 * os.arch() can not return x32, also return arm64, cannot return aarch64 as suggested in #85
1 parent 252b87b commit 5c2c54e

File tree

6 files changed

+61
-7
lines changed

6 files changed

+61
-7
lines changed

.github/workflows/ci.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,58 @@ concurrency:
1919
cancel-in-progress: true
2020

2121
jobs:
22+
test:
23+
runs-on: ${{ matrix.config.os }}
24+
strategy:
25+
matrix:
26+
# Note: GitHub does not host Alpine runners, so we skip testing there for now.
27+
config:
28+
- { os: ubuntu-latest, arch: x64 } # foundry_v[ersion]_linux_amd64.tar.gz
29+
- { os: ubuntu-24.04-arm, arch: arm64 } # foundry_v[ersion]_linux_arm64.tar.gz
30+
- { os: macos-latest, arch: arm64 } # foundry_v[ersion]_darwin_arm64.tar.gz
31+
- { os: macos-15-intel, arch: x64 } # foundry_v[ersion]_darwin_amd64.tar.gz
32+
- { os: windows-latest, arch: x64 } # foundry_v[ersion]_windows_amd64.zip
33+
version: [stable, nightly]
34+
permissions:
35+
contents: read
36+
steps:
37+
- uses: actions/checkout@v5
38+
with:
39+
persist-credentials: false
40+
41+
- name: Use Node.js 24.x
42+
uses: actions/setup-node@v5
43+
with:
44+
node-version: 24.x
45+
46+
- name: Install dependencies
47+
run: npm ci --ignore-scripts
48+
49+
- name: Rebuild dist/
50+
run: npm run build
51+
52+
- name: Test action installation (${{ matrix.version }})
53+
uses: ./
54+
with:
55+
version: ${{ matrix.version }}
56+
cache: false
57+
58+
- name: Verify Foundry installation
59+
shell: bash
60+
run: |
61+
forge --version
62+
cast --version
63+
anvil --version
64+
chisel --version
65+
66+
- name: Test basic Foundry functionality
67+
shell: bash
68+
run: |
69+
forge init test-project --force
70+
cd test-project
71+
forge build
72+
forge test -vvv
73+
2274
match:
2375
runs-on: ubuntu-latest
2476
permissions:
@@ -27,6 +79,7 @@ jobs:
2779
- uses: actions/checkout@v5
2880
with:
2981
persist-credentials: false
82+
3083
- name: Use Node.js 24.x
3184
uses: actions/setup-node@v5
3285
with:
@@ -106,6 +159,7 @@ jobs:
106159
runs-on: ubuntu-latest
107160
if: always()
108161
needs:
162+
- test
109163
- match
110164
- codeql
111165
timeout-minutes: 30

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v24.8.0
1+
v24.9.0

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,10 @@ When opening a PR, you must build the action exactly following the below steps f
131131
Install [nvm](https://github.com/nvm-sh/nvm).
132132

133133
```console
134-
$ nvm install 24.8.0
134+
$ nvm install 24.9.0
135135
$ nvm use
136-
$ npm ci
136+
$ npm ci --ignore-scripts
137137
$ npm run build
138138
```
139139

140-
You **must** use the Node.js version `24.8.0` to build.
140+
You **must** use the Node.js version `24.9.0` to build.

dist/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45522,8 +45522,8 @@ function normalizeVersionName(version) {
4552245522

4552345523
function mapArch(arch) {
4552445524
const mappings = {
45525-
x32: "386",
4552645525
x64: "amd64",
45526+
arm64: "arm64",
4552745527
};
4552845528

4552945529
return mappings[arch] || arch;

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ function normalizeVersionName(version) {
66

77
function mapArch(arch) {
88
const mappings = {
9-
x32: "386",
109
x64: "amd64",
10+
arm64: "arm64",
1111
};
1212

1313
return mappings[arch] || arch;

0 commit comments

Comments
 (0)