chore(deps) Update all non-major dependencies #1213
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
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/[email protected] | |
- name: β¬οΈ Checkout repo | |
uses: actions/checkout@v4 | |
- 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/[email protected] | |
- name: β¬οΈ Checkout repo | |
uses: actions/checkout@v4 | |
- 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@v4 | |
- name: β Setup node | |
uses: actions/setup-node@v4 | |
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@v4 | |
- name: β Setup node | |
uses: actions/setup-node@v4 | |
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@v4 | |
- name: β Setup node | |
uses: actions/setup-node@v4 | |
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@v4 | |
- name: π Copy test env vars | |
run: cp .env.example .env | |
- name: β Setup node | |
uses: actions/setup-node@v4 | |
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' |