From e529ab5585233e26bae42e2572c6a18b68dff43c Mon Sep 17 00:00:00 2001 From: Liora Milbaum Date: Fri, 14 Apr 2023 16:12:52 +0300 Subject: [PATCH] chore(devcontainer): Fixed errors and added CI workflow --- .devcontainer.json | 31 ++++++++++++++++++++++++++++++ .devcontainer/Dockerfile | 6 ------ .devcontainer/devcontainer.json | 26 ------------------------- .github/workflows/devcontainer.yml | 17 ++++++++++++++++ Dockerfile | 17 ++++++++++++++++ 5 files changed, 65 insertions(+), 32 deletions(-) create mode 100644 .devcontainer.json delete mode 100644 .devcontainer/Dockerfile delete mode 100644 .devcontainer/devcontainer.json create mode 100644 .github/workflows/devcontainer.yml create mode 100644 Dockerfile diff --git a/.devcontainer.json b/.devcontainer.json new file mode 100644 index 00000000000000..5aacfcf607639e --- /dev/null +++ b/.devcontainer.json @@ -0,0 +1,31 @@ +{ + "hostRequirements": { + "cpus": 4, + "memory": "7gb", + "storage": "32gb" + }, + "name": "Renovate", + "dockerFile": "Dockerfile", + "customizations": { + "vscode": { + "settings": { + "terminal.integrated.profiles.linux": { + "bash": { "path": "/bin/bash" } + }, + "terminal.integrated.defaultProfile.linux": "bash" + }, + "extensions": [ + "dbaeumer.vscode-eslint", + "esbenp.prettier-vscode", + "orta.vscode-jest", + "EditorConfig.editorconfig" + ] + } + }, + "runArgs": [ + "--cap-add=SYS_PTRACE", + "--security-opt", + "seccomp=unconfined", + "--privileged" + ] +} diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile deleted file mode 100644 index bc9853f54eeec2..00000000000000 --- a/.devcontainer/Dockerfile +++ /dev/null @@ -1,6 +0,0 @@ -FROM ghcr.io/containerbase/node:18.16.0@sha256:fc48ac97eb5d0dee207d4a336a52d7d3be68e1adec01cc1d13a1c12fab80a265 - -USER root - -# renovate: datasource=npm -RUN install-tool yarn 1.22.19 diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json deleted file mode 100644 index 306cb29b34a443..00000000000000 --- a/.devcontainer/devcontainer.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "hostRequirements": { - "cpus": 4, - "memory": "8gb", - "storage": "32gb" - }, - "name": "Renovate", - "dockerFile": "Dockerfile", - "settings": { - "terminal.integrated.profiles.linux": { "bash": { "path": "/bin/bash" } }, - "terminal.integrated.defaultProfile.linux": "bash" - }, - "extensions": [ - "dbaeumer.vscode-eslint", - "esbenp.prettier-vscode", - "orta.vscode-jest", - "EditorConfig.editorconfig" - ], - "runArgs": [ - "--cap-add=SYS_PTRACE", - "--security-opt", - "seccomp=unconfined", - "--privileged" - ], - "postCreateCommand": "yarn install" -} diff --git a/.github/workflows/devcontainer.yml b/.github/workflows/devcontainer.yml new file mode 100644 index 00000000000000..75fb2c2351ecd1 --- /dev/null +++ b/.github/workflows/devcontainer.yml @@ -0,0 +1,17 @@ +name: 'devcontainer' +on: + pull_request: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3.5.2 + + - name: Build and run dev container task + uses: devcontainers/ci@v0.3.1900000328 + with: + runCmd: cd /root; yarn test diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000000000..4e6a802ca8a154 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,17 @@ +FROM ghcr.io/containerbase/node:18.16.0@sha256:fc48ac97eb5d0dee207d4a336a52d7d3be68e1adec01cc1d13a1c12fab80a265 + +USER root +WORKDIR /root + +COPY . . + +RUN apt update; \ + apt install -y software-properties-common make g++; \ + add-apt-repository ppa:deadsnakes/ppa; \ + apt update; \ + apt install python3.12; \ + ln -s /usr/bin/python3 /usr/bin/python + +# renovate: datasource=npm +RUN install-tool yarn 1.22.19 +RUN yarn install