40 lines
844 B
YAML
40 lines
844 B
YAML
name: Run tests on PR - new
|
|
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
jobs:
|
|
test:
|
|
name: Run tests
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Setup Node
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: '18.17.0'
|
|
|
|
- name: Setup timezone
|
|
uses: zcong1993/setup-timezone@master
|
|
with:
|
|
timezone: Europe/Stockholm
|
|
|
|
- name: set npm version
|
|
run: npm install -g npm@10.2.0
|
|
|
|
- name: install node modules
|
|
run: cd apps/skolplattformen-app-new && npm ci
|
|
|
|
- name: Run tests
|
|
run: cd apps/skolplattformen-app-new && npm test
|
|
env:
|
|
CI: true
|
|
|
|
- name: Check linting
|
|
run: cd apps/skolplattformen-app-new && npm run lint
|
|
env:
|
|
CI: true
|