Skip to content

Commit a7b945c

Browse files
fix: allow for other archs (#1239)
* fix: allow for other archs * fix: platform tests
1 parent 98ab2c5 commit a7b945c

File tree

6 files changed

+25
-6
lines changed

6 files changed

+25
-6
lines changed

.github/workflows/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
runs-on: ${{ matrix.os }}
4141
strategy:
4242
matrix:
43-
os: [macos-latest, windows-latest, ubuntu-latest]
43+
os: [macos-latest, windows-latest, ubuntu-latest, macos-latest-xlarge]
4444
steps:
4545
- name: Checkout
4646
uses: actions/[email protected]
@@ -76,4 +76,4 @@ jobs:
7676
name: codecov-version
7777
version: v0.2.0
7878
verbose: true
79-
token: ${{ secrets.CODECOV_TOKEN }}
79+
token: ${{ secrets.CODECOV_TOKEN }}

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
`v4` of the Codecov GitHub Action will use the [Codecov CLI](https://github.com/codecov/codecov-cli) to upload coverage reports to Codecov.
1010

1111
Breaking Changes
12-
- No current support for `aarch64` and `alpine` architectures.
1312
- Tokenless uploading is unsupported. However, PRs made from forks to the upstream public repos will support tokenless (e.g. contributors to OS projects do not need the upstream repo's Codecov token)
1413
- Various arguments to the Action have been removed
1514

@@ -21,6 +20,14 @@ To integrate Codecov with your Actions pipeline, specify the name of this reposi
2120

2221
This Action also requires you to [provide an upload token](https://docs.codecov.io/docs/frequently-asked-questions#section-where-is-the-repository-upload-token-found-) from [codecov.io](https://www.codecov.io) (tip: in order to avoid exposing your token, [store it](https://docs.codecov.com/docs/adding-the-codecov-token#github-actions) as a `secret`).
2322

23+
Currently, the Action will identify linux, macos, and windows runners. However, the Action may misidentify other architectures. The OS can be specified as
24+
- alpine
25+
- alpine-arm64
26+
- linux
27+
- linux-arm64
28+
- macos
29+
- windows
30+
2431
Inside your `.github/workflows/workflow.yml` file:
2532

2633
```yaml

dist/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32477,6 +32477,9 @@ const PLATFORMS = [
3247732477
'linux',
3247832478
'macos',
3247932479
'windows',
32480+
'alpine',
32481+
'linux-arm64',
32482+
'alpine-arm64',
3248032483
];
3248132484
const setFailure = (message, failCi) => {
3248232485
failCi ? core.setFailed(message) : core.warning(message);

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/helpers.test.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ test('getBaseUrl', () => {
4343
'https://cli.codecov.io/latest/linux/codecov',
4444
'https://cli.codecov.io/latest/macos/codecov',
4545
'https://cli.codecov.io/latest/windows/codecov.exe',
46+
'https://cli.codecov.io/latest/alpine/codecov',
47+
'https://cli.codecov.io/latest/linux-arm64/codecov',
48+
'https://cli.codecov.io/latest/alpine-arm64/codecov',
4649
]);
4750

4851
expect(PLATFORMS.map((platform) => {
@@ -51,19 +54,22 @@ test('getBaseUrl', () => {
5154
'https://cli.codecov.io/v0.1.0_8880/linux/codecov',
5255
'https://cli.codecov.io/v0.1.0_8880/macos/codecov',
5356
'https://cli.codecov.io/v0.1.0_8880/windows/codecov.exe',
57+
'https://cli.codecov.io/v0.1.0_8880/alpine/codecov',
58+
'https://cli.codecov.io/v0.1.0_8880/linux-arm64/codecov',
59+
'https://cli.codecov.io/v0.1.0_8880/alpine-arm64/codecov',
5460
]);
5561
});
5662

5763
test('isWindows', () => {
5864
expect(PLATFORMS.map((platform) => {
5965
return isWindows(platform);
60-
})).toEqual([false, false, true]);
66+
})).toEqual([false, false, true, false, false, false]);
6167
});
6268

6369
test('isValidPlatform', () => {
6470
expect(PLATFORMS.map((platform) => {
6571
return isValidPlatform(platform);
66-
})).toEqual([true, true, true]);
72+
})).toEqual([true, true, true, true, true, true]);
6773

6874
expect(isValidPlatform('fakeos')).toBeFalsy();
6975
});

src/helpers.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ const PLATFORMS = [
44
'linux',
55
'macos',
66
'windows',
7+
'alpine',
8+
'linux-arm64',
9+
'alpine-arm64',
710
];
811

912
const setFailure = (message: string, failCi: boolean): void => {

0 commit comments

Comments
 (0)