Skip to content

Create dependabot.yml #133

Create dependabot.yml

Create dependabot.yml #133

Workflow file for this run

# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Node.js CI
on:
push:
branches: [ "main", "master" ]
pull_request:
branches: [ "main", "master" ]
env:
# Replaces the value set in .env.test.local
NEXT_PUBLIC_NODE_ENV: test
# Replaces the value set in .env.test.local
# DB stuff. There is a default mysql server with root/root. See https://ovirium.com/blog/how-to-make-mysql-work-in-your-github-actions/
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY: ${{ secrets.NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY }}
CLERK_SECRET_KEY: ${{ secrets.CLERK_SECRET_KEY }}
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
# See here for caching with `yarn` https://github.com/actions/cache/blob/main/examples.md#node---yarn or you can leverage caching with actions/setup-node https://github.com/actions/setup-node
path: |
~/.npm
${{ github.workspace }}/.next/cache
# Generate a new cache whenever packages or source files change.
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
# If source files changed but packages didn't, rebuild from a prior cache.
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-
- name: Install 🛠
env:
GH_TOKEN: ${{ github.token }}
run: npm ci
- run: npm run pretest
- run: npm run test:coverage:prepare-folders
- run: npm run test:coverage:jest
- run: npm run test:coverage:component
#- run: npm run test:db:clear
#- run: npm run test:db:init
- run: npm run test:build
- run: npm run test:start & npm run test:wait-on
- run: npm run test:cy:run
- run: npm run posttest
- run: npm run report:combined
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
# there might be no screenshots and videos created when there are no test failures
# so only upload screenshots if previous step has failed
- uses: actions/upload-artifact@v3
if: failure()
with:
name: screenshots
path: cypress/screenshots
- uses: actions/upload-artifact@v3
if: failure()
with:
name: videos
path: cypress/videos