Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: add ubuntu arm runners #558

Merged
merged 2 commits into from
Jan 20, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -20,10 +20,13 @@ env:

jobs:
test:
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- ubuntu-22.04-arm
node_version:
- 20
- 18
@@ -98,7 +101,7 @@ jobs:
});
await core.group(`Set includes`, async () => {
let includes = [];
for (const os of ['ubuntu-latest', 'macos-13', 'windows-latest']) {
for (const os of ['ubuntu-latest', 'ubuntu-22.04-arm', 'macos-13', 'windows-latest']) {
for (const test of tests) {
if (test === 'docker/install.test.itg.ts') {
includes.push({ os: os, test: test, test_name: 'root', docker_install_type: 'image', docker_install_version: '27.3.1' });
2 changes: 2 additions & 0 deletions .github/workflows/virtual-env.yml
Original file line number Diff line number Diff line change
@@ -24,6 +24,8 @@ jobs:
- ubuntu-24.04
- ubuntu-22.04
- ubuntu-20.04
- ubuntu-24.04-arm
- ubuntu-22.04-arm
steps:
-
name: File system
1 change: 1 addition & 0 deletions __tests__/docker/install.test.ts
Original file line number Diff line number Diff line change
@@ -60,6 +60,7 @@ describe('download', () => {
])(
'acquires %p of docker (%s)', async (source, platformOS) => {
jest.spyOn(osm, 'platform').mockImplementation(() => platformOS as NodeJS.Platform);
jest.spyOn(osm, 'arch').mockImplementation(() => 'x64');
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might need changes in hubRepository.ts or we could just use undock directly.

Ok this was just a matter of updating tests to enforce arch platform to x64.

const install = new Install({
source: source,
runDir: tmpDir,

Unchanged files with check annotations Beta

# See the License for the specific language governing permissions and
# limitations under the License.
frOM busybox as base

Check warning on line 17 in __tests__/.fixtures/lint.Dockerfile

GitHub Actions / test-itg (ubuntu-latest, buildx/buildx.test.itg.ts)

All commands within the Dockerfile should use the same casing (either upper or lower)

ConsistentInstructionCasing: Command 'frOM' should match the case of the command majority (uppercase) More info: https://docs.docker.com/go/dockerfile/rule/consistent-instruction-casing/

Check warning on line 17 in __tests__/.fixtures/lint.Dockerfile

GitHub Actions / test-itg (ubuntu-22.04-arm, buildx/buildx.test.itg.ts)

All commands within the Dockerfile should use the same casing (either upper or lower)

ConsistentInstructionCasing: Command 'frOM' should match the case of the command majority (uppercase) More info: https://docs.docker.com/go/dockerfile/rule/consistent-instruction-casing/
cOpy lint.Dockerfile .

Check warning on line 18 in __tests__/.fixtures/lint.Dockerfile

GitHub Actions / test-itg (ubuntu-latest, buildx/buildx.test.itg.ts)

All commands within the Dockerfile should use the same casing (either upper or lower)

ConsistentInstructionCasing: Command 'cOpy' should match the case of the command majority (uppercase) More info: https://docs.docker.com/go/dockerfile/rule/consistent-instruction-casing/

Check warning on line 18 in __tests__/.fixtures/lint.Dockerfile

GitHub Actions / test-itg (ubuntu-22.04-arm, buildx/buildx.test.itg.ts)

All commands within the Dockerfile should use the same casing (either upper or lower)

ConsistentInstructionCasing: Command 'cOpy' should match the case of the command majority (uppercase) More info: https://docs.docker.com/go/dockerfile/rule/consistent-instruction-casing/

Check warning on line 18 in __tests__/.fixtures/lint.Dockerfile

GitHub Actions / test-itg (ubuntu-22.04-arm, buildx/buildx.test.itg.ts)

All commands within the Dockerfile should use the same casing (either upper or lower)

ConsistentInstructionCasing: Command 'cOpy' should match the case of the command majority (uppercase) More info: https://docs.docker.com/go/dockerfile/rule/consistent-instruction-casing/
# some special chars: distroless/python3-debian12のPythonは3.11
# https://github.com/docker/build-push-action/issues/1204#issuecomment-2274056016
from scratch

Check warning on line 23 in __tests__/.fixtures/lint.Dockerfile

GitHub Actions / test-itg (ubuntu-latest, buildx/buildx.test.itg.ts)

All commands within the Dockerfile should use the same casing (either upper or lower)

ConsistentInstructionCasing: Command 'from' should match the case of the command majority (uppercase) More info: https://docs.docker.com/go/dockerfile/rule/consistent-instruction-casing/

Check warning on line 23 in __tests__/.fixtures/lint.Dockerfile

GitHub Actions / test-itg (ubuntu-22.04-arm, buildx/buildx.test.itg.ts)

All commands within the Dockerfile should use the same casing (either upper or lower)

ConsistentInstructionCasing: Command 'from' should match the case of the command majority (uppercase) More info: https://docs.docker.com/go/dockerfile/rule/consistent-instruction-casing/

Check warning on line 23 in __tests__/.fixtures/lint.Dockerfile

GitHub Actions / test-itg (ubuntu-22.04-arm, buildx/buildx.test.itg.ts)

All commands within the Dockerfile should use the same casing (either upper or lower)

ConsistentInstructionCasing: Command 'from' should match the case of the command majority (uppercase) More info: https://docs.docker.com/go/dockerfile/rule/consistent-instruction-casing/
MAINTAINER moby@example.com

Check warning on line 24 in __tests__/.fixtures/lint.Dockerfile

GitHub Actions / test-itg (ubuntu-latest, buildx/buildx.test.itg.ts)

The MAINTAINER instruction is deprecated, use a label instead to define an image author

MaintainerDeprecated: Maintainer instruction is deprecated in favor of using label More info: https://docs.docker.com/go/dockerfile/rule/maintainer-deprecated/

Check warning on line 24 in __tests__/.fixtures/lint.Dockerfile

GitHub Actions / test-itg (ubuntu-22.04-arm, buildx/buildx.test.itg.ts)

The MAINTAINER instruction is deprecated, use a label instead to define an image author

MaintainerDeprecated: Maintainer instruction is deprecated in favor of using label More info: https://docs.docker.com/go/dockerfile/rule/maintainer-deprecated/
COPy --from=base \

Check warning on line 25 in __tests__/.fixtures/lint.Dockerfile

GitHub Actions / test-itg (ubuntu-latest, buildx/buildx.test.itg.ts)

All commands within the Dockerfile should use the same casing (either upper or lower)

ConsistentInstructionCasing: Command 'COPy' should match the case of the command majority (uppercase) More info: https://docs.docker.com/go/dockerfile/rule/consistent-instruction-casing/

Check warning on line 25 in __tests__/.fixtures/lint.Dockerfile

GitHub Actions / test-itg (ubuntu-latest, buildx/buildx.test.itg.ts)

All commands within the Dockerfile should use the same casing (either upper or lower)

ConsistentInstructionCasing: Command 'COPy' should match the case of the command majority (uppercase) More info: https://docs.docker.com/go/dockerfile/rule/consistent-instruction-casing/

Check warning on line 25 in __tests__/.fixtures/lint.Dockerfile

GitHub Actions / test-itg (ubuntu-22.04-arm, buildx/buildx.test.itg.ts)

All commands within the Dockerfile should use the same casing (either upper or lower)

ConsistentInstructionCasing: Command 'COPy' should match the case of the command majority (uppercase) More info: https://docs.docker.com/go/dockerfile/rule/consistent-instruction-casing/
/lint.Dockerfile \
/
CMD [ "echo", "Hello, Norway!" ]

Check warning on line 29 in __tests__/.fixtures/lint.Dockerfile

GitHub Actions / test-itg (ubuntu-latest, buildx/buildx.test.itg.ts)

Multiple instructions of the same type should not be used in the same stage

MultipleInstructionsDisallowed: Multiple CMD instructions should not be used in the same stage because only the last one will be used More info: https://docs.docker.com/go/dockerfile/rule/multiple-instructions-disallowed/

Check warning on line 29 in __tests__/.fixtures/lint.Dockerfile

GitHub Actions / test-itg (ubuntu-22.04-arm, buildx/buildx.test.itg.ts)

Multiple instructions of the same type should not be used in the same stage

MultipleInstructionsDisallowed: Multiple CMD instructions should not be used in the same stage because only the last one will be used More info: https://docs.docker.com/go/dockerfile/rule/multiple-instructions-disallowed/
CMD [ "echo", "Hello, Sweden!" ]
ENTRYPOINT my-program start

Check warning on line 31 in __tests__/.fixtures/lint.Dockerfile

GitHub Actions / test-itg (ubuntu-latest, buildx/buildx.test.itg.ts)

JSON arguments recommended for ENTRYPOINT/CMD to prevent unintended behavior related to OS signals

JSONArgsRecommended: JSON arguments recommended for ENTRYPOINT to prevent unintended behavior related to OS signals More info: https://docs.docker.com/go/dockerfile/rule/json-args-recommended/

Check warning on line 31 in __tests__/.fixtures/lint.Dockerfile

GitHub Actions / test-itg (ubuntu-latest, buildx/buildx.test.itg.ts)

JSON arguments recommended for ENTRYPOINT/CMD to prevent unintended behavior related to OS signals

JSONArgsRecommended: JSON arguments recommended for ENTRYPOINT to prevent unintended behavior related to OS signals More info: https://docs.docker.com/go/dockerfile/rule/json-args-recommended/

Check warning on line 31 in __tests__/.fixtures/lint.Dockerfile

GitHub Actions / test-itg (ubuntu-22.04-arm, buildx/buildx.test.itg.ts)

JSON arguments recommended for ENTRYPOINT/CMD to prevent unintended behavior related to OS signals

JSONArgsRecommended: JSON arguments recommended for ENTRYPOINT to prevent unintended behavior related to OS signals More info: https://docs.docker.com/go/dockerfile/rule/json-args-recommended/
# See the License for the specific language governing permissions and
# limitations under the License.
frOM busybox as base

Check warning on line 17 in __tests__/.fixtures/lint-other.Dockerfile

GitHub Actions / test-itg (ubuntu-22.04-arm, buildx/buildx.test.itg.ts)

All commands within the Dockerfile should use the same casing (either upper or lower)

ConsistentInstructionCasing: Command 'frOM' should match the case of the command majority (uppercase) More info: https://docs.docker.com/go/dockerfile/rule/consistent-instruction-casing/
cOpy lint-other.Dockerfile .
froM busybox aS notused
COPY lint-other.Dockerfile .
from scratch

Check warning on line 23 in __tests__/.fixtures/lint-other.Dockerfile

GitHub Actions / test-itg (ubuntu-latest, buildx/buildx.test.itg.ts)

All commands within the Dockerfile should use the same casing (either upper or lower)

ConsistentInstructionCasing: Command 'from' should match the case of the command majority (uppercase) More info: https://docs.docker.com/go/dockerfile/rule/consistent-instruction-casing/
COPy --from=base \
/lint-other.Dockerfile \
/