Skip to content

Commit 15a92ae

Browse files
authored
Merge pull request #11 from jerseysu/fix-pipeline-2
ci(playwright.yaml): add lint check to flow
2 parents 44dd62b + b49d430 commit 15a92ae

File tree

3 files changed

+24
-5
lines changed

3 files changed

+24
-5
lines changed
Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,29 @@
11
name: Publish
22
on:
3-
push:
4-
branches: [main]
3+
workflow_run:
4+
workflows: ['Playwright-Tests']
5+
types:
6+
- completed
57

68
jobs:
79
deployment:
810
timeout-minutes: 60
911
name: "deploy to github"
1012
runs-on: ubuntu-latest
13+
if: github.event_name != 'pull_request'
1114
steps:
12-
- name: deploy to github page
13-
run: npm run deploy
15+
- uses: actions/checkout@v4
16+
- uses: actions/setup-node@v4
17+
with:
18+
node-version: lts/*
19+
- name: Install dependencies
20+
run: npm ci
21+
- name: Lint
22+
run: npm run lint
23+
- name: Build
24+
run: npm run build
25+
- name: Deploy to Github Pages
26+
uses: peaceiris/actions-gh-pages@v3
27+
with:
28+
github_token: ${{ secrets.GITHUB_TOKEN }}
29+
publish_dir: build

.github/workflows/playwright.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Playwright Tests
1+
name: Playwright-Tests
22
on:
33
push:
44
branches: [main]
@@ -16,6 +16,8 @@ jobs:
1616
node-version: lts/*
1717
- name: Install dependencies
1818
run: npm ci
19+
- name: Lint
20+
run: npm run lint
1921
- name: Install Playwright Browsers
2022
run: npx playwright install --with-deps
2123
- name: Run Playwright tests

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
"build": "react-scripts build",
3030
"test": "react-scripts test",
3131
"test:e2e": "npx playwright test",
32+
"lint": "npx eslint .",
3233
"eject": "react-scripts eject"
3334
},
3435
"eslintConfig": {

0 commit comments

Comments
 (0)