Skip to content

Commit

Permalink
Merge pull request #3323 from serlo/3322-update-workflows-to-use-node-20
Browse files Browse the repository at this point in the history
refactor(workflows): update to node 20
  • Loading branch information
Entkenntnis authored Jan 30, 2024
2 parents 99cd022 + e364077 commit 184df61
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 39 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/e2e_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ jobs:
run:
working-directory: ./e2e-tests
steps:
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 18.x
- uses: actions/checkout@v3
node-version: 20
- uses: actions/checkout@v4
- run: yarn
- run: yarn playwright install --with-deps chromium
- uses: patrickedqvist/[email protected]
Expand All @@ -26,7 +26,7 @@ jobs:
max_timeout: 1200
check_interval: 20
- run: yarn e2e-workers
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: failure()
with:
name: e2e-screenshots-on-fail
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/e2e_tests_firefox.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ jobs:
run:
working-directory: ./e2e-tests
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18.x
node-version: 20
- run: yarn
- run: yarn playwright install --with-deps firefox
- uses: patrickedqvist/[email protected]
Expand All @@ -26,7 +26,7 @@ jobs:
max_timeout: 1200
check_interval: 20
- run: yarn e2e-firefox tests/4*.ts
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: failure()
with:
name: e2e-screenshots-on-fail
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/editor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18.x
node-version: 20
registry-url: https://registry.npmjs.org
- run: yarn
- run: yarn build:prisma
Expand Down
36 changes: 18 additions & 18 deletions .github/workflows/js.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,54 +9,54 @@ jobs:
yarn:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18.x
node-version: 20
- run: yarn --check-cache
eslint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18.x
node-version: 20
- run: yarn
- run: yarn build:prisma
- run: yarn lint:eslint
prettier:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18.x
node-version: 20
- run: yarn
- run: yarn lint:prettier
tsc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18.x
node-version: 20
- run: yarn
- run: yarn lint:tsc
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18.x
node-version: 20
- run: yarn
- run: yarn test
api:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18.x
node-version: 20
- run: yarn
- run: yarn check:api
18 changes: 9 additions & 9 deletions .github/workflows/nextjs_bundle_analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ jobs:
analyze:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20

- name: Install dependencies
uses: bahmutov/npm-install@v1
Expand All @@ -46,7 +46,7 @@ jobs:
# run_install: true

- name: Restore next build
uses: actions/cache@v3
uses: actions/cache@v4
id: restore-build-cache
env:
cache-name: cache-next-build
Expand All @@ -67,13 +67,13 @@ jobs:
run: cd apps/web && npx -p nextjs-bundle-analysis report

- name: Upload bundle
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: bundle
path: apps/web/.next/analyze/__bundle_analysis.json

- name: Download base branch bundle stats
uses: dawidd6/action-download-artifact@v2
uses: dawidd6/action-download-artifact@v3
if: success() && github.event.number
with:
workflow: nextjs_bundle_analysis.yml
Expand Down Expand Up @@ -107,22 +107,22 @@ jobs:
echo EOF >> $GITHUB_OUTPUT
- name: Find Comment
uses: peter-evans/find-comment@v2
uses: peter-evans/find-comment@v3
if: success() && github.event.number
id: fc
with:
issue-number: ${{ github.event.number }}
body-includes: '<!-- __NEXTJS_BUNDLE_@serlo/frontend -->'

- name: Create Comment
uses: peter-evans/create-or-update-comment@v2
uses: peter-evans/create-or-update-comment@v4
if: success() && github.event.number && steps.fc.outputs.comment-id == 0
with:
issue-number: ${{ github.event.number }}
body: ${{ steps.get-comment-body.outputs.body }}

- name: Update Comment
uses: peter-evans/create-or-update-comment@v2
uses: peter-evans/create-or-update-comment@v4
if: success() && github.event.number && steps.fc.outputs.comment-id != 0
with:
issue-number: ${{ github.event.number }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/repo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ jobs:
prettier:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18.x
node-version: 20
- run: yarn
- run: yarn :prettier

0 comments on commit 184df61

Please sign in to comment.