Add devcontainer configuration for CI and update lint-test-build workflow to use it

This commit is contained in:
Luis Eduardo
2025-02-03 03:42:37 +00:00
parent f38666cd67
commit bcff9d5c13
2 changed files with 13 additions and 2 deletions

View File

@@ -0,0 +1,10 @@
// For the moment --platform is not supported in devcontainers/ci when
// using docker compose, so in this devcontainer config file we are
// using the Dockerfile directly to run actions in CI.
//
// https://github.com/devcontainers/cli/issues/404
{
"build": {
"dockerfile": "../docker/Dockerfile.dev"
}
}

View File

@@ -18,7 +18,7 @@ jobs:
{os: ubuntu-24.04, platform: linux/amd64},
{os: ubuntu-24.04-arm, platform: linux/arm64}
]
name: Lint, test, and build the code
runs-on: ${{ matrix.vars.os }}
timeout-minutes: 20
@@ -40,8 +40,9 @@ jobs:
- name: Run lint, test, and build
uses: devcontainers/ci@v0.3
with:
platform: ${{ matrix.vars.platform }}
push: never
configFile: .devcontainer/devcontainer-ci.json
platform: ${{ matrix.vars.platform }}
runCmd: >
npm install && \
go mod download && \