From bcff9d5c13f8ef7b57b9ff670335781ec17cc689 Mon Sep 17 00:00:00 2001 From: Luis Eduardo Date: Mon, 3 Feb 2025 03:42:37 +0000 Subject: [PATCH] Add devcontainer configuration for CI and update lint-test-build workflow to use it --- .devcontainer/devcontainer-ci.json | 10 ++++++++++ .github/workflows/lint-test-build.yaml | 5 +++-- 2 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 .devcontainer/devcontainer-ci.json diff --git a/.devcontainer/devcontainer-ci.json b/.devcontainer/devcontainer-ci.json new file mode 100644 index 0000000..2655ac1 --- /dev/null +++ b/.devcontainer/devcontainer-ci.json @@ -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" + } +} \ No newline at end of file diff --git a/.github/workflows/lint-test-build.yaml b/.github/workflows/lint-test-build.yaml index f14b3da..166ee1a 100644 --- a/.github/workflows/lint-test-build.yaml +++ b/.github/workflows/lint-test-build.yaml @@ -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 && \