Skip to content

Commit

Permalink
dev-setup: playwright tests and devcontainer
Browse files Browse the repository at this point in the history
Initial setup of playwright tests
devcontainer ( codespaces )
github actions
prettier
  • Loading branch information
petersalomonsen committed Jan 30, 2024
1 parent 4cb25bd commit 6d5307c
Show file tree
Hide file tree
Showing 12 changed files with 13,073 additions and 1,670 deletions.
12 changes: 12 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"image": "mcr.microsoft.com/devcontainers/base:jammy",
"features": {
"ghcr.io/devcontainers/features/node:1": {}
},
"customizations": {
"vscode": {
"extensions": ["ms-playwright.playwright"]
}
},
"postCreateCommand": ".devcontainer/post-create.sh"
}
6 changes: 6 additions & 0 deletions .devcontainer/post-create.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

npm install
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/mpeterdev/bos-loader/releases/download/v0.7.1/bos-loader-v0.7.1-installer.sh | sh
npx playwright install-deps
npx playwright install
39 changes: 39 additions & 0 deletions .github/workflows/continuous-integration-workflow.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: CI
on:
pull_request:
push:
branches:
- main

jobs:
prettier:
name: Prettier
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 20
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Run code formatting check
run: npm run fmt:check
playwright-tests:
name: Playwright tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 20
cache: 'npm'
- name: Install dependencies
run: |
npm ci
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/mpeterdev/bos-loader/releases/download/v0.7.1/bos-loader-v0.7.1-installer.sh | sh
npx playwright install-deps
npx playwright install
- name: Run tests
run: |
npx playwright test
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
build/
node_modules/
.env
test-results/
Loading

0 comments on commit 6d5307c

Please sign in to comment.