From 24b8c7a8eb434ad1575ba9e5265b49c857548773 Mon Sep 17 00:00:00 2001 From: Javier Bullrich Date: Wed, 6 Mar 2024 14:41:57 +0100 Subject: [PATCH 1/2] updated javascript tests versions --- .github/workflows/javascript-test.yml | 56 +++++++++++++-------------- 1 file changed, 26 insertions(+), 30 deletions(-) diff --git a/.github/workflows/javascript-test.yml b/.github/workflows/javascript-test.yml index 19045fa..253d09c 100644 --- a/.github/workflows/javascript-test.yml +++ b/.github/workflows/javascript-test.yml @@ -1,43 +1,39 @@ name: Continuous testing -on: [pull_request] +on: + pull_request: + push: + branches: ["main"] jobs: - lint: + test: + strategy: + matrix: + command: [lint, build, test] runs-on: ubuntu-latest + name: running ${{ matrix.command }} steps: - - uses: actions/checkout@v3 - - name: Use node 18 - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: - node-version: 18 - - uses: c-hive/gha-yarn-cache@v2 - - name: Install dependencies - run: yarn install --frozen-lockfile - - run: yarn run lint - - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Use node 18 - uses: actions/setup-node@v3 + node-version: 20 + - name: Cache node modules + id: cache-npm + uses: actions/cache@v4 + env: + cache-name: cache-node-modules with: - node-version: 18 - - uses: c-hive/gha-yarn-cache@v2 + # npm cache files are stored in `~/.npm` on Linux/macOS + path: ~/.npm + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }} + restore-keys: ${{ runner.os }}-build-${{ env.cache-name }}- - name: Install dependencies run: yarn install --frozen-lockfile - - run: yarn run build + - run: yarn run ${{ matrix.command }} - test: + conclude: runs-on: ubuntu-latest + name: All tests passed + needs: [test] steps: - - uses: actions/checkout@v3 - - name: Use node 18 - uses: actions/setup-node@v3 - with: - node-version: 18 - - uses: c-hive/gha-yarn-cache@v2 - - name: Install dependencies - run: yarn install --frozen-lockfile - - run: yarn run test + - run: echo '### Good job! All the tests passed 🚀' >> $GITHUB_STEP_SUMMARY From 8041f7447b2231e0c9da0e0e278f52d8be36ee2f Mon Sep 17 00:00:00 2001 From: Javier Bullrich Date: Wed, 6 Mar 2024 14:42:19 +0100 Subject: [PATCH 2/2] updated dockerfile version --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 52ee472..2cfe05e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM node:18 as Builder +FROM node:20 as Builder WORKDIR /action @@ -10,7 +10,7 @@ COPY . . RUN yarn run build -FROM node:18-slim +FROM node:20-slim COPY --from=Builder /action/dist /action