Skip to content
This repository was archived by the owner on Aug 6, 2025. It is now read-only.

Commit 6ad9150

Browse files
authored
DOP-3431: Add GH workflow for testing OAS Page Builder module (#731)
* Add GH workflow * Temporary comment * Install jest * Install prettier; workflow job for formatting and linting * Install typescript eslint plugin * Update eslintrc * Fix lint issues * Add eslint parser * Remove temporary comment * Add push to master as trigger
1 parent cfdce9b commit 6ad9150

File tree

7 files changed

+9932
-4573
lines changed

7 files changed

+9932
-4573
lines changed

.eslintrc.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ module.exports = {
88
Atomics: 'readonly',
99
SharedArrayBuffer: 'readonly',
1010
},
11+
ignorePatterns: ['modules/**'],
1112
parser: '@typescript-eslint/parser',
1213
parserOptions: {
1314
ecmaVersion: 2018,
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: CI - OAS Page Builder
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
11+
jobs:
12+
# Checks for changes to the modules/oas-page-builder directory
13+
changes:
14+
runs-on: ubuntu-latest
15+
outputs:
16+
oas: ${{ steps.filter.outputs.oas }}
17+
steps:
18+
# For pull requests it's not necessary to checkout the code
19+
- uses: dorny/paths-filter@v2
20+
id: filter
21+
with:
22+
filters: |
23+
oas:
24+
- 'modules/oas-page-builder/**'
25+
test:
26+
needs: changes
27+
if: ${{ needs.changes.outputs.oas == 'true' }}
28+
runs-on: ubuntu-latest
29+
defaults:
30+
run:
31+
working-directory: ./modules/oas-page-builder
32+
steps:
33+
- uses: actions/checkout@v3
34+
- uses: actions/setup-node@v3
35+
with:
36+
node-version: '14.x'
37+
- name: Install dependencies
38+
run: npm ci
39+
- name: Format and lint
40+
run: npm run format && npm run lint
41+
- name: Test
42+
run: npm run test

modules/oas-page-builder/.eslintrc.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
module.exports = {
2+
root: true,
23
env: {
34
browser: true,
45
es6: true,

0 commit comments

Comments
 (0)