-
Notifications
You must be signed in to change notification settings - Fork 131
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add e2e tests * Make prettier global * Comment out broken tests * bump vitest and uncomment commented console.log unit tests * Use workspace version of @cloudflare/next-on-pages * Bump e2e test runner cli version --------- Co-authored-by: Dario Piotrowicz <[email protected]>
- Loading branch information
1 parent
68dd9e9
commit b151505
Showing
53 changed files
with
32,104 additions
and
1,948 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
root = true | ||
|
||
[*] | ||
indent_style = tab | ||
indent_size = 2 | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
name: Pull request checks | ||
on: [push] | ||
|
||
# This allows a subsequently queued workflow run to interrupt previous runs | ||
concurrency: | ||
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}' | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
formatting: | ||
name: Formatting | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Setup node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16.13.x | ||
|
||
- name: Install | ||
run: npm ci | ||
|
||
- name: Check formatting | ||
run: npm run prettier:check | ||
linting: | ||
name: Linting | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Setup node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16.13.x | ||
|
||
- name: Install | ||
run: npm ci | ||
|
||
- name: Check linting | ||
run: npm run lint | ||
types: | ||
name: Types | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Setup node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16.13.x | ||
|
||
- name: Install | ||
run: npm ci | ||
|
||
- name: Check types | ||
run: npm run types-check | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Setup node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16.13.x | ||
|
||
- name: Install | ||
run: npm ci | ||
|
||
- name: Build | ||
run: npm run build | ||
unit-tests: | ||
name: Unit tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Setup node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16.13.x | ||
|
||
- name: Install | ||
run: npm ci | ||
|
||
- name: Run unit tests | ||
run: npm run test:unit | ||
e2e-tests: | ||
name: e2e tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Setup node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18.x | ||
|
||
- name: Install | ||
run: npm ci | ||
|
||
- name: Run e2e tests | ||
run: npm run test:e2e | ||
env: | ||
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} | ||
CLOUDFLARE_ACCOUNT_ID: ${{ vars.CLOUDFLARE_ACCOUNT_ID }} | ||
PROJECT_NAME: ${{ vars.PROJECT_NAME }} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -178,3 +178,7 @@ dist | |
|
||
# Turobrepo | ||
.turbo/ | ||
|
||
# pages-e2e | ||
/pages-e2e/workspaces | ||
/pages-e2e/test-workspaces |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"json.schemas": [ | ||
{ | ||
"fileMatch": ["main.fixture"], | ||
"url": "./node_modules/@cfpreview/pages-e2e-test-runner-cli/schemas/fixture-schema.jsonc" | ||
}, | ||
{ | ||
"fileMatch": ["main.feature"], | ||
"url": "./node_modules/@cfpreview/pages-e2e-test-runner-cli/schemas/fixture-schema.jsonc" | ||
} | ||
], | ||
"files.associations": { | ||
"main.fixture": "jsonc", | ||
"main.feature": "jsonc" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,35 @@ | ||
module.exports = { | ||
env: { | ||
es2021: true, | ||
node: true | ||
node: true, | ||
}, | ||
extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended"], | ||
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended'], | ||
overrides: [], | ||
parser: "@typescript-eslint/parser", | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
sourceType: "module", | ||
project: true | ||
sourceType: 'module', | ||
project: true, | ||
}, | ||
plugins: ["@typescript-eslint", "deprecation"], | ||
plugins: ['@typescript-eslint', 'deprecation'], | ||
rules: { | ||
"no-case-declarations": "error", | ||
"no-console": "error", | ||
"prefer-const": "error", | ||
"no-mixed-spaces-and-tabs": "off", // off because it conflicts with prettier | ||
"eqeqeq": "error", | ||
"@typescript-eslint/no-explicit-any": "error", | ||
"@typescript-eslint/no-unused-vars": "error", | ||
"@typescript-eslint/consistent-type-imports": "error", | ||
'no-case-declarations': 'error', | ||
'no-console': 'error', | ||
'prefer-const': 'error', | ||
'no-mixed-spaces-and-tabs': 'off', // off because it conflicts with prettier | ||
eqeqeq: 'error', | ||
'@typescript-eslint/no-explicit-any': 'error', | ||
'@typescript-eslint/no-unused-vars': 'error', | ||
'@typescript-eslint/consistent-type-imports': 'error', | ||
|
||
// Promises & async/await | ||
"no-async-promise-executor": "error", | ||
"no-promise-executor-return": "error", | ||
"no-return-await": "error", | ||
"@typescript-eslint/await-thenable": "error", | ||
"@typescript-eslint/no-floating-promises": "error", | ||
"@typescript-eslint/promise-function-async": "error", | ||
'no-async-promise-executor': 'error', | ||
'no-promise-executor-return': 'error', | ||
'no-return-await': 'error', | ||
'@typescript-eslint/await-thenable': 'error', | ||
'@typescript-eslint/no-floating-promises': 'error', | ||
'@typescript-eslint/promise-function-async': 'error', | ||
|
||
"deprecation/deprecation": "error", | ||
'deprecation/deprecation': 'error', | ||
}, | ||
ignorePatterns: ["vitest.config.ts"] | ||
ignorePatterns: ['vitest.config.ts'], | ||
}; |
Oops, something went wrong.