From f1d379e07895a51920347d2970a742b54f6cd8b8 Mon Sep 17 00:00:00 2001 From: Peter Salomonsen Date: Tue, 30 Jan 2024 18:57:03 +0000 Subject: [PATCH] github action --- .../continuous-integration-workflow.yaml | 38 +++++++++++++++++++ package.json | 2 +- scripts/{dev-gateway.mjs => dev-gateway.js} | 0 3 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/continuous-integration-workflow.yaml rename scripts/{dev-gateway.mjs => dev-gateway.js} (100%) diff --git a/.github/workflows/continuous-integration-workflow.yaml b/.github/workflows/continuous-integration-workflow.yaml new file mode 100644 index 00000000..2487d815 --- /dev/null +++ b/.github/workflows/continuous-integration-workflow.yaml @@ -0,0 +1,38 @@ +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 + npx playwright install-deps + npx playwright install + - name: Run tests + run: | + npx playwright test \ No newline at end of file diff --git a/package.json b/package.json index b949a58c..23df1e2b 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "build": "npm run fmt && rimraf .bos/transpiled && mkdir -p .bos/transpiled/src && sucrase ./src -d .bos/transpiled/src/npm_package_name --transforms typescript,jsx --jsx-runtime preserve --disable-es-transforms --out-extension jsx && node ./build.js", "deploy": "npm run build && cd .bos/transpiled && bos components deploy", "prepare": "husky install", - "gateway": "node scripts/dev-gateway.mjs", + "gateway": "node scripts/dev-gateway.js", "test": "npx playwright test", "test:watch:codespaces": "npm test -- --ui-host=0.0.0.0" }, diff --git a/scripts/dev-gateway.mjs b/scripts/dev-gateway.js similarity index 100% rename from scripts/dev-gateway.mjs rename to scripts/dev-gateway.js