Skip to content

Commit

Permalink
fix: allow for aarch64 build (#960)
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasrockhu-codecov committed Apr 20, 2023
1 parent 6757614 commit f539f97
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 8 deletions.
2 changes: 1 addition & 1 deletion action.yml
Expand Up @@ -63,7 +63,7 @@ inputs:
description: 'Specify a prefix on files listed in the network section of the Codecov report. Useful to help resolve path fixing'
required: false
os:
description: 'Override the assumed OS. Options are alpine | linux | macos | windows.'
description: 'Override the assumed OS. Options are aarch64 | alpine | linux | macos | windows.'
required: false
override_branch:
description: 'Specify the branch name'
Expand Down
12 changes: 9 additions & 3 deletions dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions src/helpers.test.ts
Expand Up @@ -39,6 +39,7 @@ test('getBaseUrl', () => {
expect(PLATFORMS.map((platform) => {
return getBaseUrl(platform, 'latest');
})).toEqual([
'https://uploader.codecov.io/latest/aarch64/codecov',
'https://uploader.codecov.io/latest/alpine/codecov',
'https://uploader.codecov.io/latest/linux/codecov',
'https://uploader.codecov.io/latest/macos/codecov',
Expand All @@ -48,6 +49,7 @@ test('getBaseUrl', () => {
expect(PLATFORMS.map((platform) => {
return getBaseUrl(platform, 'v0.1.0_8880');
})).toEqual([
'https://uploader.codecov.io/v0.1.0_8880/aarch64/codecov',
'https://uploader.codecov.io/v0.1.0_8880/alpine/codecov',
'https://uploader.codecov.io/v0.1.0_8880/linux/codecov',
'https://uploader.codecov.io/v0.1.0_8880/macos/codecov',
Expand All @@ -58,13 +60,13 @@ test('getBaseUrl', () => {
test('isWindows', () => {
expect(PLATFORMS.map((platform) => {
return isWindows(platform);
})).toEqual([false, false, false, true]);
})).toEqual([false, false, false, false, true]);
});

test('isValidPlatform', () => {
expect(PLATFORMS.map((platform) => {
return isValidPlatform(platform);
})).toEqual([true, true, true, true]);
})).toEqual([true, true, true, true, true]);

expect(isValidPlatform('fakeos')).toBeFalsy();
});
8 changes: 7 additions & 1 deletion src/helpers.ts
@@ -1,6 +1,12 @@
import * as core from '@actions/core';

const PLATFORMS = ['alpine', 'linux', 'macos', 'windows'];
const PLATFORMS = [
'aarch64',
'alpine',
'linux',
'macos',
'windows',
];

const setFailure = (message: string, failCi: boolean): void => {
failCi ? core.setFailed(message) : core.warning(message);
Expand Down

0 comments on commit f539f97

Please sign in to comment.