diff --git a/.github/workflows/pr_check_new.yml b/.github/workflows/pr_check_new.yml new file mode 100644 index 000000000..aa41cb392 --- /dev/null +++ b/.github/workflows/pr_check_new.yml @@ -0,0 +1,39 @@ +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.13.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 app/apps/skolplattformen-app-new && npm ci + + - name: Run tests + run: cd app/apps/skolplattformen-app-new && npm test + env: + CI: true + + - name: Check linting + run: cd app/apps/skolplattformen-app-new && npm run lint + env: + CI: true