fix: package.json & package-lock.json to reduce vulnerabilities #452
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a basic workflow to help you get started with Actions | |
name: CI | |
# Controls when the workflow will run | |
on: | |
push: | |
branches: | |
- '**' | |
- '!master' | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
# This workflow contains a single job called "build" | |
build: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v3 | |
- run: sleep 30 | |
- name: Generate Cloudflare Preview Url | |
uses: zentered/[email protected] | |
id: cloudflare_preview_url | |
env: | |
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
CLOUDFLARE_ACCOUNT_EMAIL: ${{ secrets.CLOUDFLARE_ACCOUNT_EMAIL }} | |
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
with: | |
cloudflare_project_id: 'tech-radar' | |
wait_until_ready: true | |
- name: Get Cloudflare Preview URL | |
run: echo "${{ steps.cloudflare_preview_url.outputs.preview_url }}" | |
- uses: actions/checkout@v3 | |
- name: Use Node.js ${{ matrix.node-version}} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
check-latest: true | |
- name: Install dependencies | |
run: npm install | |
- name: Type check and code style (ESLint) | |
run: npm run type-check && npm run lint | |
- name: Run unit tests | |
run: npm test | |
- name: Run Cucumber Tests | |
run: TEST_URL=${{ steps.cloudflare_preview_url.outputs.preview_url }} npm run cucumberTest |