Skip to content

chore: update dependencies #743

chore: update dependencies

chore: update dependencies #743

name: continuous-integration
on:
pull_request_target:
push:
branches:
- develop
- feature/**
env:
CI: true
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
FONTAWESOME_TOKEN: ${{ secrets.FONTAWESOME_TOKEN }}
jobs:
prepare:
runs-on: ubuntu-20.04
name: Prepare
steps:
-
if: ${{ github.actor == 'dependabot[bot]' }}
name: Checkout code
uses: actions/checkout@v3.3.0
with:
ref: ${{ github.event.pull_request.head.sha }}
-
if: ${{ github.actor != 'dependabot[bot]' }}
name: Checkout code
uses: actions/checkout@v3.3.0
-
uses: actions/setup-node@v3.6.0
with:
node-version: 18
-
name: Cache node_modules
id: cache-node_modules
uses: actions/cache@v3.2.2
with:
path: node_modules
key: ${{ runner.os }}-node_modules-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-node_modules-
${{ runner.os }}-
-
name: Install dependencies
if: steps.cache-node_modules.outputs.cache-hit != 'true'
run: |
yarn install --frozen-lockfile
check:
runs-on: ubuntu-20.04
needs: prepare
name: Check
steps:
-
if: ${{ github.actor == 'dependabot[bot]' }}
name: Checkout code
uses: actions/checkout@v3.3.0
with:
ref: ${{ github.event.pull_request.head.sha }}
-
if: ${{ github.actor != 'dependabot[bot]' }}
name: Checkout code
uses: actions/checkout@v3.3.0
-
uses: actions/setup-node@v3.6.0
with:
node-version: 18
-
name: Cache node_modules
id: cache-node_modules
uses: actions/cache@v3.2.2
with:
path: node_modules
key: ${{ runner.os }}-node_modules-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-node_modules-
${{ runner.os }}-
-
name: Install dependencies
if: steps.cache-node_modules.outputs.cache-hit != 'true'
run: |
yarn install --frozen-lockfile
-
name: Lint
run: |
yarn lint
build-and-run:
runs-on: ubuntu-20.04
needs: prepare
name: Build
steps:
-
if: ${{ github.actor == 'dependabot[bot]' }}
name: Checkout code
uses: actions/checkout@v3.3.0
with:
ref: ${{ github.event.pull_request.head.sha }}
-
if: ${{ github.actor != 'dependabot[bot]' }}
name: Checkout code
uses: actions/checkout@v3.3.0
-
uses: actions/setup-node@v3.6.0
with:
node-version: 18
-
name: Cache node_modules
id: cache-node_modules
uses: actions/cache@v3.2.2
with:
path: node_modules
key: ${{ runner.os }}-node_modules-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-node_modules-
${{ runner.os }}-
-
name: Cache next
id: cache-next
uses: actions/cache@v3.2.2
with:
path: ${{ github.workspace }}/.next/cache
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/yarn.lock') }}
-
name: Install dependencies
if: steps.cache-node_modules.outputs.cache-hit != 'true'
run: |
yarn install --frozen-lockfile
-
name: Build
run: |
yarn build
-
name: Run & check status code
run: |
node .next/standalone/server.js &
PID=$!
sleep 5
curl --silent --fail http://localhost:3000/api/_health
kill -s SIGINT $PID