2
2
mirror of https://github.com/Thream/website.git synced 2024-07-21 09:28:32 +02:00
website/.github/workflows/test.yml

49 lines
981 B
YAML
Raw Normal View History

2021-10-24 05:48:06 +02:00
name: 'Test'
on:
push:
branches: [develop]
2021-10-24 05:48:06 +02:00
pull_request:
branches: [master, develop]
jobs:
test-unit:
runs-on: 'ubuntu-latest'
steps:
2023-05-13 20:28:24 +02:00
- uses: 'actions/checkout@v3.5.2'
2021-10-24 05:48:06 +02:00
2023-05-13 20:28:24 +02:00
- name: 'Setup Node.js'
2023-01-11 17:39:09 +01:00
uses: 'actions/setup-node@v3.6.0'
2021-10-24 05:48:06 +02:00
with:
2022-12-13 11:38:07 +01:00
node-version: '18.x'
2021-10-24 05:48:06 +02:00
cache: 'npm'
2023-05-13 20:28:24 +02:00
- name: 'Install dependencies'
run: 'npm clean-install'
2021-10-24 05:48:06 +02:00
- name: 'Unit Test'
run: 'npm run test:unit'
2023-05-13 20:28:24 +02:00
test-e2e:
2021-10-24 05:48:06 +02:00
runs-on: 'ubuntu-latest'
steps:
2023-04-03 00:11:19 +02:00
- uses: 'actions/checkout@v3.5.0'
2021-10-24 05:48:06 +02:00
2023-05-13 20:28:24 +02:00
- name: 'Setup Node.js'
2023-01-11 17:39:09 +01:00
uses: 'actions/setup-node@v3.6.0'
2021-10-24 05:48:06 +02:00
with:
2022-12-13 11:38:07 +01:00
node-version: '18.x'
2021-10-24 05:48:06 +02:00
cache: 'npm'
2023-05-13 20:28:24 +02:00
- name: 'Install dependencies'
run: 'npm clean-install'
2021-10-24 05:48:06 +02:00
- name: 'Build'
run: 'npm run build'
- name: 'html-w3c-validator'
run: 'npm run test:html-w3c-validator'
2021-10-24 05:48:06 +02:00
- name: 'End To End (e2e) Test'
run: 'npm run test:e2e'