Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Align tooling with team standards #278

Merged
merged 13 commits into from
Oct 18, 2024
4 changes: 4 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ jobs:
npm ci
npx playwright install
npx playwright install-deps
env:
HUSKY: 0

- name: Generate (Pre-)Release Draft
if: ${{ steps.prep.outputs.tag_name == '' }}
Expand Down Expand Up @@ -365,6 +367,7 @@ jobs:
working-directory: ./tests/fixtures/post-release/cucumber
env:
BUILD_ID: Github RUN ID ${{ env.GITHUB_RUN_ID }}
HUSKY: 0
run: |
npm ci --production
saucectl run --runner-version "url: https://github.com/saucelabs/sauce-playwright-runner/releases/download/${{ steps.parse_version.outputs.version }}/playwright-windows-amd64.zip" --config ./.sauce/config_win.yml
Expand Down Expand Up @@ -399,6 +402,7 @@ jobs:
working-directory: ./tests/fixtures/post-release/cucumber
env:
BUILD_ID: Github RUN ID ${{ env.GITHUB_RUN_ID }}
HUSKY: 0
run: |
npm ci --production
saucectl run --runner-version "url: https://github.com/saucelabs/sauce-playwright-runner/releases/download/${{ steps.parse_version.outputs.version }}/playwright-macos-amd64.zip" --config ./.sauce/config_mac.yml
40 changes: 24 additions & 16 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,13 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: "npm"
node-version-file: '.nvmrc'
cache: 'npm'

- name: Install Dependencies
run: npm ci
env:
HUSKY: 0

- name: Lint
run: npm run lint
Expand All @@ -45,14 +47,16 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: "npm"
node-version-file: '.nvmrc'
cache: 'npm'

- name: Install Dependencies
run: |
npm ci
npx playwright install
npx playwright install-deps
env:
HUSKY: 0

- name: Build
run: npm run build
Expand All @@ -69,14 +73,16 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: "npm"
node-version-file: '.nvmrc'
cache: 'npm'

- name: Install Dependencies
run: |
npm ci
npx playwright install
npx playwright install-deps
env:
HUSKY: 0

- name: Build
run: npm run build
Expand All @@ -98,13 +104,13 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: "npm"
node-version-file: '.nvmrc'
cache: 'npm'

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
python-version: '3.11'

- name: Google Cloud Login
uses: 'google-github-actions/auth@v2'
Expand Down Expand Up @@ -146,16 +152,16 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: "npm"
node-version-file: '.nvmrc'
cache: 'npm'

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
python-version: '3.11'

- name: Google Cloud Login
id: "auth"
id: 'auth'
uses: google-github-actions/auth@v2
with:
credentials_json: '${{ secrets.GCS_RUNNER_SA_KEY }}'
Expand Down Expand Up @@ -241,7 +247,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
python-version: '3.11'

- name: Setup saucectl
uses: saucelabs/saucectl-run-action@v4
Expand Down Expand Up @@ -291,8 +297,8 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: "npm"
node-version-file: '.nvmrc'
cache: 'npm'

- name: Setup saucectl
uses: saucelabs/saucectl-run-action@v4
Expand All @@ -314,3 +320,5 @@ jobs:
saucectl run \
--runner-version "url: ${BUNDLE_URL}" \
--config .sauce/config_${{ matrix.os }}.yml
env:
HUSKY: 0
4 changes: 1 addition & 3 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx pretty-quick --staged
npm run lint
4 changes: 0 additions & 4 deletions .husky/pre-push

This file was deleted.

3 changes: 0 additions & 3 deletions babel.config.js

This file was deleted.

13 changes: 7 additions & 6 deletions eslint.config.js → eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
const ts = require('typescript-eslint');
const js = require('@eslint/js');
const prettier = require('eslint-config-prettier');
const jest = require('eslint-plugin-jest');
// @ts-check
import ts from 'typescript-eslint';
import js from '@eslint/js';
import prettier from 'eslint-config-prettier';
import jest from 'eslint-plugin-jest';

module.exports = ts.config(
export default ts.config(
js.configs.recommended,
...ts.configs.recommended,
prettier,
Expand All @@ -13,7 +14,7 @@ module.exports = ts.config(
{
files: ['**/*.*js', '**/*.*ts'],
rules: {
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/no-require-imports': 'off',
'@typescript-eslint/no-explicit-any': 'warn',
'no-control-regex': 'off',
'no-undef': 'warn',
Expand Down
8 changes: 4 additions & 4 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/** @type {import('jest').Config} */
const config = {
testMatch: ['**/tests/unit/**/*.[jt]s?(x)'],
collectCoverageFrom: ['src/**/*.js'],
collectCoverageFrom: ['src/**/*.ts'],
collectCoverage: true,
transformIgnorePatterns: [
'/node_modules/(?!(axios)/)', // Uses module import statements, which aren't supported by jest, so it has to be transformed by babel.
],
clearMocks: true,
coverageProvider: 'v8',
transform: { '^.+\\.ts?$': 'ts-jest' },
};

module.exports = config;
Loading
Loading