Skip to content

Merge branch 'master' of github.com:atlas-bi/System #126

Merge branch 'master' of github.com:atlas-bi/System

Merge branch 'master' of github.com:atlas-bi/System #126

Workflow file for this run

name: πŸ§ͺ Test
on:
push:
branches:
- master
- alpha
- dev
pull_request: {}
permissions:
actions: write
contents: read
jobs:
shell:
name: βœ“ ShellCheck
runs-on: ubuntu-latest
steps:
- name: πŸ›‘ Cancel Previous Runs
uses: styfle/[email protected]
- name: ⬇️ Checkout repo
uses: actions/checkout@v3
- name: βŽ” Setup ShellCheck
run: sudo apt-get update; sudo apt-get install -y shellcheck
- name: πŸ”¬ Lint
run: |
cd packages
shellcheck **/*.sh
shellcheck **/atlas-requests
shellcheck **/install
shellcheck **/postinst
shellcheck **/preinst
lint:
name: ⬣ ESLint
runs-on: ubuntu-latest
steps:
- name: πŸ›‘ Cancel Previous Runs
uses: styfle/[email protected]
- name: ⬇️ Checkout repo
uses: actions/checkout@v3
- name: βŽ” Setup node
uses: actions/setup-node@v3
with:
node-version: 16
- name: πŸ“₯ Download deps
uses: bahmutov/npm-install@v1
with:
useLockFile: false
- name: πŸ”¬ Lint
run: npm run lint
typecheck:
name: Κ¦ TypeScript
runs-on: ubuntu-latest
steps:
- name: πŸ›‘ Cancel Previous Runs
uses: styfle/[email protected]
- name: ⬇️ Checkout repo
uses: actions/checkout@v3
- name: βŽ” Setup node
uses: actions/setup-node@v3
with:
node-version: 16
- name: πŸ“₯ Download deps
uses: bahmutov/npm-install@v1
with:
useLockFile: false
- name: πŸ”Ž Type check
run: npm run typecheck --if-present
vitest:
name: ⚑ Vitest
runs-on: ubuntu-latest
steps:
- name: πŸ›‘ Cancel Previous Runs
uses: styfle/[email protected]
- name: ⬇️ Checkout repo
uses: actions/checkout@v3
- name: βŽ” Setup node
uses: actions/setup-node@v3
with:
node-version: 16
- name: πŸ“₯ Download deps
uses: bahmutov/npm-install@v1
with:
useLockFile: false
- name: ⚑ Run vitest
run: npm run test -- --coverage
cypress:
name: ⚫️ Cypress
runs-on: ubuntu-latest
steps:
- name: πŸ›‘ Cancel Previous Runs
uses: styfle/[email protected]
- name: ⬇️ Checkout repo
uses: actions/checkout@v3
- name: πŸ„ Copy test env vars
run: cp .env.example .env
- name: βŽ” Setup node
uses: actions/setup-node@v3
with:
node-version: 16
- name: πŸ“₯ Download deps
uses: bahmutov/npm-install@v1
with:
useLockFile: false
- name: 🐳 Docker compose
# the sleep is just there to give time for postgres to get started
run: docker-compose up -d && sleep 3
env:
DATABASE_URL: 'postgresql://postgres:postgres@localhost:5432/postgres'
- name: πŸ›  Setup Database
run: npx prisma migrate reset --force
- name: βš™οΈ Build
run: npm run build
- name: 🌳 Cypress run
uses: cypress-io/github-action@v5
with:
start: npm run start:mocks
wait-on: 'http://localhost:8811'
env:
PORT: '8811'