mirror of
https://github.com/nowcommunity/nowdatabase.git
synced 2026-10-12 19:13:52 +03:00
36 lines
746 B
YAML
36 lines
746 B
YAML
name: 'Unit-tests'
|
|
|
|
on:
|
|
pull_request:
|
|
types: [opened, reopened, synchronize]
|
|
branches:
|
|
- '**'
|
|
|
|
jobs:
|
|
unit-tests:
|
|
name: 'Unit tests'
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Create env-files
|
|
env:
|
|
GEONAMES_USERNAME: ${{ secrets.GEONAMES_USERNAME }}
|
|
run: GEONAMES_USERNAME=$GEONAMES_USERNAME npm run config
|
|
|
|
- name: Setup node
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
|
|
- name: 'Install dependencies'
|
|
run: npm run setup
|
|
|
|
- name: Run backend unit-tests
|
|
run: npm run test:unit:backend
|
|
|
|
- name: Run frontend unit-tests
|
|
run: npm run test:unit:frontend
|