Skip to content

Merge pull request #106 from atlas-bi/renovate/major-5-prisma-monorepo #435

Merge pull request #106 from atlas-bi/renovate/major-5-prisma-monorepo

Merge pull request #106 from atlas-bi/renovate/major-5-prisma-monorepo #435

Workflow file for this run

name: πŸ§ͺ Test
on:
push:
branches:
- master
- alpha
- dev
pull_request: {}
permissions:
actions: write
contents: read
jobs:
apt:
name: πŸ”₯ Lintian
runs-on: ubuntu-latest
steps:
- name: πŸ›‘ Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.11.0
- name: ⬇️ Checkout repo
uses: actions/checkout@v3
- name: βŽ” Setup
run: |
sudo apt-get update
sudo apt-get install dh-make devscripts -y
- name: πŸ”¬ Lint
run: |
cd packages
# create an install
cp -r "atlas-requests-<version>" "atlas-requests-$VERSION"
cd "atlas-requests-$VERSION"
# update version
find . -type f -name "*" -exec sed -i'' -e "s/<version>/$VERSION/g" {} +
# build
debuild --no-tgz-check --no-lintian -us -uc
# lint
lintian --fail-on error
env:
VERSION: 1.1.1
shell:
name: βœ“ ShellCheck
runs-on: ubuntu-latest
steps:
- name: πŸ›‘ Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.11.0
- 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/cancel-workflow-action@0.11.0
- 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/cancel-workflow-action@0.11.0
- 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/cancel-workflow-action@0.11.0
- 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/cancel-workflow-action@0.11.0
- 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'