From 65abaa9c7b71d16fda7f160a6d2d8b7208b09684 Mon Sep 17 00:00:00 2001 From: Jesse Wierzbinski Date: Thu, 11 Jul 2024 13:25:31 +0200 Subject: [PATCH] feat: :construction_worker: Add linting workflow, add Node to Docker building step --- .github/workflows/lint.yml | 33 +++++++++++++++++++++++++++++++++ .github/workflows/tests.yml | 2 +- Dockerfile | 3 +++ 3 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/lint.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 00000000..06c83daa --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,33 @@ +name: Lint & Format + +on: + push: + branches: ["*"] + pull_request: + # The branches below must be a subset of the branches above + branches: ["main"] + +jobs: + tests: + runs-on: ubuntu-latest + permissions: + contents: read + security-events: write + actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status + + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Setup Bun + uses: oven-sh/setup-bun@v2 + + - name: Install NPM packages + run: | + bun install + + - name: Run linting + run: | + bunx @biomejs/biome ci . diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 57833671..5031fbf5 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -36,7 +36,7 @@ jobs: submodules: recursive - name: Setup Bun - uses: oven-sh/setup-bun@v1 + uses: oven-sh/setup-bun@v2 - name: Install NPM packages run: | diff --git a/Dockerfile b/Dockerfile index 16cdca96..d1e776ae 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,6 +2,9 @@ FROM oven/bun:1.1.18-alpine AS base RUN apk add --no-cache libstdc++ +# Add Node.js +COPY --from=node:22-alpine /usr/local/bin/node /usr/local/bin/node + # Install dependencies into temp directory # This will cache them and speed up future builds FROM base AS install