diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 00000000..78e5c75e --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,20 @@ +## Changes + +- + +### Screenshot / Video of the changes + +## Pre-Merge Checklist + +### Notifications: + +- [ ] Added Reviewers + +### Documentation: + +- [ ] Updated CHANGELOG. +- [ ] Updated version. + +### Code Quality + +- [ ] Added or updated unit tests. diff --git a/.github/workflows/javascript_checks.yaml b/.github/workflows/javascript_checks.yaml new file mode 100644 index 00000000..b9ccd006 --- /dev/null +++ b/.github/workflows/javascript_checks.yaml @@ -0,0 +1,52 @@ +name: JS checks + +on: + push: + branches: + - main + - dev + pull_request: + +jobs: + + build_lint: + name: build_lint + runs-on: ubuntu-latest + steps: + - name: Clone repository + uses: actions/checkout@v3 + + - name: Use Node.js 18 + uses: actions/setup-node@v3 + with: + node-version: 18 + + - name: Install dependencies + run: yarn + + - name: Lint + run: | + yarn lint:js + yarn lint:style + + - name: Build + run: yarn build + + integration_tests: + name: integration_tests + runs-on: ubuntu-latest + + steps: + - name: Clone repository + uses: actions/checkout@v3 + + - name: Use Node.js 18 + uses: actions/setup-node@v3 + with: + node-version: 18 + + - name: Install dependencies + run: yarn + + - name: test + run: yarn test \ No newline at end of file diff --git a/.github/workflows/playwright.yaml b/.github/workflows/playwright.yaml new file mode 100644 index 00000000..aca0e956 --- /dev/null +++ b/.github/workflows/playwright.yaml @@ -0,0 +1,43 @@ +name: E2E + +on: + push: + branches: + - main + - dev + pull_request: + +jobs: + e2e_tests: + name: e2e_tests + runs-on: ubuntu-latest + + steps: + - name: Clone repository + uses: actions/checkout@v3 + + - name: Use Node.js 18 + uses: actions/setup-node@v3 + with: + node-version: 18 + + - name: Install dependencies of the frontend + run: yarn + + - name: Install dependencies of the e2e tests + run: | + cd ./e2e + yarn + npx playwright install --with-deps + + - name: Run Playwright tests + run: | + cd ./e2e + yarn test + + - uses: actions/upload-artifact@v3 + if: always() + with: + name: playwright-report + path: playwright-report/ + retention-days: 30 \ No newline at end of file diff --git a/e2e/playwright.config.ts b/e2e/playwright.config.ts index b8d29dfc..38cd9c87 100644 --- a/e2e/playwright.config.ts +++ b/e2e/playwright.config.ts @@ -9,9 +9,15 @@ const testDir = defineBddConfig({ export default defineConfig({ testDir, use: { + baseURL: 'http://localhost:5173/', video: 'retain-on-failure', screenshot: 'only-on-failure', }, + webServer: { + command: 'cd ../ && yarn dev', + url: 'http://localhost:5173/', + timeout: 1200000, + }, expect: { timeout: 20000, },