Skip to content

feat: add name attribute #235

feat: add name attribute

feat: add name attribute #235

Workflow file for this run

name: Test
on: [push, pull_request]
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: setup Node.js
uses: actions/setup-node@v3
with:
node-version: 20
- uses: actions/cache@v2
id: root-npm-cache
with:
path: 'node_modules'
key: root-npm-${{ hashFiles('package-lock.json') }}
- uses: actions/cache@v2
id: client-npm-cache
with:
path: 'client/node_modules'
key: client-npm-${{ hashFiles('client/package-lock.json') }}
- uses: actions/cache@v2
id: server-npm-cache
with:
path: 'server/node_modules'
key: server-npm-${{ hashFiles('server/package-lock.json') }}
- run: npm install
if: steps.root-npm-cache.outputs.cache-hit != 'true'
- run: npm install --prefix client
if: steps.client-npm-cache.outputs.cache-hit != 'true'
- run: npm install --prefix server
if: steps.server-npm-cache.outputs.cache-hit != 'true'
- run: npm run generate
- run: npm run lint
- run: npm run typecheck
- run: cp server/.env.example server/.env
- run: docker compose -p magnito-test up -d
- run: npm test
- run: docker build . -t magnito --build-arg VERSION=0.0.0
- run: docker run -d --name test --network magnito-test_default magnito
- run: count=0 && until [ "$(docker inspect --format='{{json .State.Health.Status}}' test)" == "\"healthy\"" ] || [ $count -eq 30 ]; do sleep 1; count=$((count + 1)); done && [ $count -ne 30 ]
- run: docker stop test