Skip to content

task(README): Final touches for the README files #10600

task(README): Final touches for the README files

task(README): Final touches for the README files #10600

Workflow file for this run

name: Main
on: pull_request
jobs:
init:
runs-on: ubuntu-22.04
steps:
- name: Cancel previous workflow
uses: styfle/cancel-workflow-action@0.4.0
with:
access_token: ${{ github.token }}
lint:
runs-on: ubuntu-22.04
strategy:
matrix:
node-version: [ 18 ]
needs: init
steps:
- name: Check out repository
uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
- name: Lookup cached node_modules
uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install packages
run: yarn install
- name: Lint code
run: yarn lint
compile:
runs-on: ubuntu-22.04
strategy:
matrix:
node-version: [ 18 ]
needs: init
steps:
- name: Get target branch name (pull request)
if: github.event_name == 'pull_request'
shell: bash
run: echo "BRANCH_NAME=$(echo ${GITHUB_BASE_REF} | tr / -)" >> $GITHUB_ENV
- name: Check out repository
uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
- name: Lookup cached node_modules
uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install packages
run: yarn install
- name: Build icon package
run: yarn build:icons
- name: Build common module
run: yarn build:common
- name: Import texts (develop)
if: ${{ env.BRANCH_NAME != 'master' }}
run: yarn cms:lokalize-import --clean-json
- name: Import texts (production)
if: ${{ env.BRANCH_NAME == 'master' }}
run: yarn cms:lokalize-import:prd --clean-json
- name: Typecheck all code
run: yarn typecheck
test:
runs-on: ubuntu-22.04
strategy:
matrix:
node-version: [ 18 ]
needs: init
steps:
- name: Check out repository
uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
- name: Lookup cached node_modules
uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install packages
run: yarn install
- name: Build common module
run: yarn build:common
- name: Build icons module
run: yarn build:icons
- name: Export texts
run: yarn cms:lokalize-import --clean-json
- name: Run tests
run: yarn test:ci
docker:
runs-on: ubuntu-22.04
needs: init
if: contains(github.head_ref, 'release')
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Build
uses: docker/build-push-action@v2
with:
build-args: |
"ARG_NEXT_PUBLIC_SANITY_PROJECT_ID=5mog5ask"
"SANITY_API_TOKEN=<sanity_token>"
"ARG_NEXT_PUBLIC_SANITY_DATASET=production"
"ARG_NEXT_PUBLIC_COMMIT_ID=local-test-random-string"
"ARG_API_URL=https://coronadashboard.rijksoverheid.nl/json/latest-data.zip"
push: false