Skip to content

chore(deps): update nextjs monorepo to v14.2.5 #12568

chore(deps): update nextjs monorepo to v14.2.5

chore(deps): update nextjs monorepo to v14.2.5 #12568

Workflow file for this run

name: CI Pipeline
on:
pull_request:
types:
- opened
- reopened
- synchronize
- ready_for_review
push:
branches:
- master
tags:
- '*'
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Read .nvmrc
run: echo "NVMRC=$(cat .nvmrc)" >> $GITHUB_OUTPUT
id: nvm
- name: Use Node.js (.nvmrc)
uses: actions/setup-node@v4
with:
node-version: "${{ steps.nvm.outputs.NVMRC }}"
cache: yarn
- name: yarn install
run: yarn
- name: TSC
run: yarn tsc --noEmit
- name: Lint
run: yarn lint
- name: Lint SASS
run: yarn lint-sass
- name: Unit Test
run: yarn test
- name: Production build
run: yarn build
test-integration:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Read .nvmrc
run: echo "NVMRC=$(cat .nvmrc)" >> $GITHUB_OUTPUT
id: nvm
- name: Use Node.js (.nvmrc)
uses: actions/setup-node@v4
with:
node-version: "${{ steps.nvm.outputs.NVMRC }}"
cache: yarn
- name: yarn install
run: yarn
- name: Install operating system dependencies
run: |
yarn playwright install
yarn playwright install-deps
- name: Bring up browser test stack
run: docker compose up --wait
- name: Debug bring up browser test stack
if: failure()
run: docker compose logs app
- name: Browser Tests
run: yarn test:browser
- name: Take down browser test stack
run: docker compose down
test-chromatic:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- run: yarn
- uses: chromaui/action@v11
with:
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}
exitZeroOnChanges: false
build-and-push:
needs: [test, test-integration, test-chromatic]
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'
outputs:
client_image_tag: master-${{ steps.commit_sha.outputs.commit_sha }}-${{ steps.date.outputs.date }}
steps:
- uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Get current date
id: date
run: echo "date=$(date --utc +%Y%m%d.%H%M)" >> $GITHUB_OUTPUT
- name: Get sha with 8 chars long
id: commit_sha
run: echo "commit_sha=${GITHUB_SHA:0:8}" >> $GITHUB_OUTPUT
- name: Build and push client image
uses: docker/build-push-action@v5
with:
push: true
load: false
platforms: linux/amd64,linux/arm64
target: prod
tags: |
ghcr.io/elifesciences/enhanced-preprints-client:latest
ghcr.io/elifesciences/enhanced-preprints-client:${{ github.sha }}
ghcr.io/elifesciences/enhanced-preprints-client:master-${{ steps.commit_sha.outputs.commit_sha }}-${{ steps.date.outputs.date }}
notify-start:
runs-on: ubuntu-latest
if: always() && github.ref == 'refs/heads/master'
outputs:
ts: ${{ steps.slack.outputs.ts }}
steps:
- name: Notify Slack testing started
id: slack
uses: slackapi/slack-github-action@v1.26.0
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_EPP_GITHUB_BOT_TOKEN }}
with:
channel-id: C06FPSVJPUH
payload: |
{
"text": "EPP Client CI: ${{
(!needs.test.result || !needs.test-integration.result) &&
'testing... :sonic:'
|| ((needs.test.result != 'success' || needs.test-integration.result != 'success' || needs.test-chromatic.result != 'success') &&
'tests failed'
|| (!needs.build-and-push.result &&
'building... :sonic:'
|| (needs.build-and-push.result != 'success' &&
'building failed'
|| 'success'
)))
}}",
"blocks": [
{
"type": "header",
"text": {
"type": "plain_text",
"text": "EPP Client CI: ${{
(!needs.test.result || !needs.test-integration.result) &&
'testing... :sonic:'
|| ((needs.test.result != 'success' || needs.test-integration.result != 'success' || needs.test-chromatic.result != 'success') &&
'tests failed'
|| (!needs.build-and-push.result &&
'building... :sonic:'
|| (needs.build-and-push.result != 'success' &&
'building failed'
|| 'success'
)))
}}",
"emoji": true
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": ${{ toJSON(github.event.commits[0].message || github.event.pull_request.title) }}
},
"fields": [
{
"type": "mrkdwn",
"text": "commit: <${{ github.event.pull_request.html_url || github.event.head_commit.url }}|${{ github.event.pull_request.head.sha || github.event.head_commit.id }}>"
},
{
"type": "mrkdwn",
"text": "author: ${{ github.event.pull_request.head.user.login || github.event.commits[0].author.name }}"
}
]
},
{
"type": "divider"
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*Stages:*"
},
"fields": [
{
"type": "mrkdwn",
"text": "${{ !needs.test.result && ':large_orange_circle:' || (needs.test.result == 'success' && ':white_check_mark:' || ':x:') }} Linting and unit tests"
},
{
"type": "mrkdwn",
"text": "${{ !needs.test-integration.result && ':large_orange_circle:' || (needs.test-integration.result == 'success' && ':white_check_mark:' || ':x:') }} Integration tests"
},
{
"type": "mrkdwn",
"text": "${{ !needs.test-chromatic.result && ':large_orange_circle:' || (needs.test-chromatic.result == 'success' && ':white_check_mark:' || ':x:') }} Visual regression tests"
},
{
"type": "mrkdwn",
"text": "${{ (!needs.test.result || needs.test.result != 'success') && ':white_circle:' || (!needs.build-and-push.result && ':large_orange_circle:' || (needs.build-and-push.result == 'success' && ':white_check_mark:' || ':x:'))}} Docker image build ${{ needs.build-and-push.outputs.client_image_tag && format('<https://github.com/elifesciences/enhanced-preprints-client/pkgs/container/enhanced-preprints-client/{0}|({0})>', needs.build-and-push.outputs.client_image_tag) }}"
}
]
},
{
"type": "divider"
},
{
"type": "section",
"fields": [
{
"type": "mrkdwn",
"text": "<https://github.com/${{github.repository}}/actions/runs/${{ github.run_id }}|View build>"
},
{
"type": "mrkdwn",
"text": "<${{ github.event.pull_request.diff_url || github.event.compare }}|View diff>"
}
]
}
]
}
notify-test-result:
needs: [notify-start, test, test-integration, test-chromatic]
runs-on: ubuntu-latest
if: always() && github.ref == 'refs/heads/master'
steps:
- name: Notify Slack testing results
uses: slackapi/slack-github-action@v1.26.0
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_EPP_GITHUB_BOT_TOKEN }}
with:
channel-id: C06FPSVJPUH
update-ts: ${{ needs['notify-start'].outputs.ts }}
payload: |
{
"text": "EPP Client CI: ${{
(!needs.test.result || !needs.test-integration.result) &&
'testing... :sonic:'
|| ((needs.test.result != 'success' || needs.test-integration.result != 'success' || needs.test-chromatic.result != 'success') &&
'tests failed'
|| (!needs.build-and-push.result &&
'building... :sonic:'
|| (needs.build-and-push.result != 'success' &&
'building failed'
|| 'success'
)))
}}",
"blocks": [
{
"type": "header",
"text": {
"type": "plain_text",
"text": "EPP Client CI: ${{
(!needs.test.result || !needs.test-integration.result) &&
'testing... :sonic:'
|| ((needs.test.result != 'success' || needs.test-integration.result != 'success' || needs.test-chromatic.result != 'success') &&
'tests failed'
|| (!needs.build-and-push.result &&
'building... :sonic:'
|| (needs.build-and-push.result != 'success' &&
'building failed'
|| 'success'
)))
}}",
"emoji": true
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": ${{ toJSON(github.event.commits[0].message || github.event.pull_request.title) }}
},
"fields": [
{
"type": "mrkdwn",
"text": "commit: <${{ github.event.pull_request.html_url || github.event.head_commit.url }}|${{ github.event.pull_request.head.sha || github.event.head_commit.id }}>"
},
{
"type": "mrkdwn",
"text": "author: ${{ github.event.pull_request.head.user.login || github.event.commits[0].author.name }}"
}
]
},
{
"type": "divider"
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*Stages:*"
},
"fields": [
{
"type": "mrkdwn",
"text": "${{ !needs.test.result && ':large_orange_circle:' || (needs.test.result == 'success' && ':white_check_mark:' || ':x:') }} Linting and unit tests"
},
{
"type": "mrkdwn",
"text": "${{ !needs.test-integration.result && ':large_orange_circle:' || (needs.test-integration.result == 'success' && ':white_check_mark:' || ':x:') }} Integration tests"
},
{
"type": "mrkdwn",
"text": "${{ !needs.test-chromatic.result && ':large_orange_circle:' || (needs.test-chromatic.result == 'success' && ':white_check_mark:' || ':x:') }} Visual regression tests"
},
{
"type": "mrkdwn",
"text": "${{ (!needs.test.result || needs.test.result != 'success') && ':white_circle:' || (!needs.build-and-push.result && ':large_orange_circle:' || (needs.build-and-push.result == 'success' && ':white_check_mark:' || ':x:'))}} Docker image build ${{ needs.build-and-push.outputs.client_image_tag && format('<https://github.com/elifesciences/enhanced-preprints-client/pkgs/container/enhanced-preprints-client/{0}|({0})>', needs.build-and-push.outputs.client_image_tag) }}"
}
]
},
{
"type": "divider"
},
{
"type": "section",
"fields": [
{
"type": "mrkdwn",
"text": "<https://github.com/${{github.repository}}/actions/runs/${{ github.run_id }}|View build>"
},
{
"type": "mrkdwn",
"text": "<${{ github.event.pull_request.diff_url || github.event.compare }}|View diff>"
}
]
}
]
}
notify-build-result:
needs: [notify-start, test, test-integration, test-chromatic, notify-test-result, build-and-push]
runs-on: ubuntu-latest
if: always() && github.ref == 'refs/heads/master'
steps:
- name: Notify Slack build final message
uses: slackapi/slack-github-action@v1.26.0
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_EPP_GITHUB_BOT_TOKEN }}
with:
channel-id: C06FPSVJPUH
update-ts: ${{ needs['notify-start'].outputs.ts }}
payload: |
{
"text": "EPP Client CI: ${{
(!needs.test.result || !needs.test-integration.result) &&
'testing... :sonic:'
|| ((needs.test.result != 'success' || needs.test-integration.result != 'success' || needs.test-chromatic.result != 'success') &&
'tests failed'
|| (!needs.build-and-push.result &&
'building... :sonic:'
|| (needs.build-and-push.result != 'success' &&
'building failed'
|| 'success'
)))
}}",
"blocks": [
{
"type": "header",
"text": {
"type": "plain_text",
"text": "EPP Client CI: ${{
(!needs.test.result || !needs.test-integration.result) &&
'testing... :sonic:'
|| ((needs.test.result != 'success' || needs.test-integration.result != 'success' || needs.test-chromatic.result != 'success') &&
'tests failed'
|| (!needs.build-and-push.result &&
'building... :sonic:'
|| (needs.build-and-push.result != 'success' &&
'building failed'
|| 'success'
)))
}}",
"emoji": true
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": ${{ toJSON(github.event.commits[0].message || github.event.pull_request.title) }}
},
"fields": [
{
"type": "mrkdwn",
"text": "commit: <${{ github.event.pull_request.html_url || github.event.head_commit.url }}|${{ github.event.pull_request.head.sha || github.event.head_commit.id }}>"
},
{
"type": "mrkdwn",
"text": "author: ${{ github.event.pull_request.head.user.login || github.event.commits[0].author.name }}"
}
]
},
{
"type": "divider"
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*Stages:*"
},
"fields": [
{
"type": "mrkdwn",
"text": "${{ !needs.test.result && ':large_orange_circle:' || (needs.test.result == 'success' && ':white_check_mark:' || ':x:') }} Linting and unit tests"
},
{
"type": "mrkdwn",
"text": "${{ !needs.test-integration.result && ':large_orange_circle:' || (needs.test-integration.result == 'success' && ':white_check_mark:' || ':x:') }} Integration tests"
},
{
"type": "mrkdwn",
"text": "${{ !needs.test-chromatic.result && ':large_orange_circle:' || (needs.test-chromatic.result == 'success' && ':white_check_mark:' || ':x:') }} Visual regression tests"
},
{
"type": "mrkdwn",
"text": "${{ (!needs.test.result || needs.test.result != 'success') && ':white_circle:' || (!needs.build-and-push.result && ':large_orange_circle:' || (needs.build-and-push.result == 'success' && ':white_check_mark:' || ':x:'))}} Docker image build ${{ needs.build-and-push.outputs.client_image_tag && format('<https://github.com/elifesciences/enhanced-preprints-client/pkgs/container/enhanced-preprints-client/{0}|({0})>', needs.build-and-push.outputs.client_image_tag) }}"
}
]
},
{
"type": "divider"
},
{
"type": "section",
"fields": [
{
"type": "mrkdwn",
"text": "<https://github.com/${{github.repository}}/actions/runs/${{ github.run_id }}|View build>"
},
{
"type": "mrkdwn",
"text": "<${{ github.event.pull_request.diff_url || github.event.compare }}|View diff>"
}
]
}
]
}