Skip to content

Commit

Permalink
Merge pull request #7602 from jrjohnson/fixup-lint
Browse files Browse the repository at this point in the history
Cleanup our lint dependencies and scripts
  • Loading branch information
stopfstedt authored Feb 6, 2024
2 parents 5eb734b + 9612078 commit 630fab3
Show file tree
Hide file tree
Showing 8 changed files with 82 additions and 145 deletions.
23 changes: 11 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
run: pnpm run lint

test:
name: "Test"
name: ${{matrix.workspace}} Test (${{ matrix.node-version }})
runs-on: ubuntu-latest
timeout-minutes: 15

Expand All @@ -47,7 +47,6 @@ jobs:
workspace:
- frontend
- test-app

steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
Expand All @@ -60,10 +59,10 @@ jobs:
- name: Install Dependencies
run: pnpm install
- name: Run Tests
run: pnpm run --filter ${{matrix.workspace}} test:ember
run: pnpm --filter ${{matrix.workspace}} exec ember test

build:
name: Build
name: Build (${{ matrix.node-version }})
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
Expand All @@ -84,7 +83,7 @@ jobs:
run: pnpm run --filter frontend build

browserstack-test:
name: Browserstack ${{ matrix.launcher }}
name: Browserstack ${{matrix.workspace}} ${{ matrix.launcher }}
runs-on: ubuntu-latest
timeout-minutes: 20
needs: [test]
Expand Down Expand Up @@ -120,13 +119,13 @@ jobs:
# The Job ID + Run ID isn't unique across matrix runs and will fail when run simultaneously
BROWSERSTACK_LOCAL_ID_SUFFIX: ${{ matrix.launcher }}
run: |
pnpm run --filter ${{matrix.workspace}} browserstack:connect
pnpm run --filter ${{matrix.workspace}} test:ember:browserstack --launch=${{ matrix.launcher }}
pnpm run --filter ${{matrix.workspace}} browserstack:disconnect
pnpm run --filter ${{matrix.workspace}} browserstack:results
pnpm --filter ${{matrix.workspace}} exec ember browserstack:connect
pnpm --filter ${{matrix.workspace}} exec ember test --test-port=7774 --host=127.0.0.1 --config-file=testem.browserstack.js --launch=${{ matrix.launcher }}
pnpm --filter ${{matrix.workspace}} exec ember browserstack:disconnect
pnpm --filter ${{matrix.workspace}} exec ember browserstack:results
firefox-test:
name: Browser Tests (Firefox)
name: ${{matrix.workspace}} Firefox ${{ matrix.firefox-version }}
runs-on: ubuntu-latest
timeout-minutes: 20
needs: [test]
Expand All @@ -153,7 +152,7 @@ jobs:
firefox-version: ${{ matrix.firefox-version }}
- run: firefox --version
- name: test
run: pnpm run --filter ${{matrix.workspace}} test:ember --launch=Firefox
run: pnpm --filter ${{matrix.workspace}} exec ember test --launch=Firefox

try-scenarios:
name: ${{ matrix.try-scenario }}
Expand Down Expand Up @@ -203,7 +202,7 @@ jobs:
- name: Install Dependencies
run: pnpm install
- name: Run Tests
run: pnpm run --filter frontend test:ember
run: pnpm --filter frontend exec ember test

build-with-embroider:
name: Build With Embroider
Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/percy-test-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ jobs:
if: contains(github.event.pull_request.labels.*.name, 'run percy tests')
runs-on: ubuntu-latest
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
workspace:
- frontend
- test-app
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -33,9 +39,4 @@ jobs:
cache: pnpm
- run: pnpm install
- name: Run Percy Tests
run: pnpm run --workspace-concurrency=1 -r test:percy
- uses: act10ns/slack@v2
if: failure()
with:
status: ${{ job.status }}
message: Percy Run Failed {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/actions/runs/{{ env.GITHUB_RUN_ID }}
run: pnpm --filter ${{matrix.workspace}} exec percy exec -- ember test
8 changes: 7 additions & 1 deletion .github/workflows/percy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ jobs:
name: Test and Capture Screenshots
runs-on: ubuntu-latest
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
workspace:
- frontend
- test-app
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
Expand All @@ -31,7 +37,7 @@ jobs:
cache: pnpm
- run: pnpm install
- name: Run Percy Tests
run: pnpm run --workspace-concurrency=1 -r test:percy
run: pnpm --filter ${{matrix.workspace}} exec percy exec -- ember test
- uses: act10ns/slack@v2
if: failure()
with:
Expand Down
9 changes: 4 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,20 @@
"scripts": {
"lint": "concurrently \"npm:lint:*(!fix)\" --names \"lint:\"",
"lint:css": "stylelint \"**/*.scss\"",
"lint:css:fix": "concurrently \"npm:lint:css -- --fix\"",
"lint:fix": "concurrently \"npm:lint:*:fix\" --names \"fix:\"",
"lint:css:fix": "stylelint \"**/*.scss\" --fix",
"lint:hbs": "ember-template-lint .",
"lint:hbs:fix": "ember-template-lint . --fix",
"lint:js": "eslint . --cache",
"lint:js:fix": "eslint . --fix",
"preinstall": "npx only-allow pnpm",
"start": "pnpm --filter frontend start",
"start:test-app": "pnpm --filter frontend start",
"test": "pnpm --filter '*' test",
"test:ember": "pnpm --filter '*' test:ember",
"start:test-app": "pnpm --filter test-app start",
"test:frontend": "pnpm run --filter frontend test",
"test:test-app": "pnpm run --filter test-app test"
},
"devDependencies": {
"@babel/eslint-parser": "7.23.3",
"@babel/plugin-proposal-decorators": "^7.23.6",
"concurrently": "^8.2.2",
"ember-template-lint": "^5.13.0",
"eslint": "^8.55.0",
Expand Down
28 changes: 0 additions & 28 deletions packages/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,30 +11,13 @@
},
"scripts": {
"build": "ember build --environment=production",
"lint": "concurrently \"pnpm:lint:*(!fix)\" --names \"lint:\"",
"lint:css": "stylelint \"**/*.scss\"",
"lint:css:fix": "concurrently \"pnpm:lint:css -- --fix\"",
"lint:fix": "concurrently \"pnpm:lint:*:fix\" --names \"fix:\"",
"lint:hbs": "ember-template-lint .",
"lint:hbs:fix": "ember-template-lint . --fix",
"lint:js": "eslint . --cache",
"lint:js:fix": "eslint . --fix",
"start": "ember serve",
"test": "concurrently \"pnpm:lint\" \"pnpm:test:*\" --names \"lint,test:\"",
"test:ember": "ember test",
"percy:test": "percy exec -- pnpm run test:ember",
"deploy:production": "ember deploy production --activate",
"deploy:staging": "ember deploy staging --activate",
"deploy:test": "ember deploy development",
"test:ember:browserstack": "ember test --test-port=7774 --host=127.0.0.1 --config-file=testem.browserstack.js",
"browserstack:connect": "ember browserstack:connect",
"browserstack:disconnect": "ember browserstack:disconnect",
"browserstack:results": "ember browserstack:results",
"preinstall": "npx only-allow pnpm"
},
"devDependencies": {
"@babel/core": "^7.23.6",
"@babel/eslint-parser": "7.23.3",
"@babel/plugin-proposal-decorators": "^7.23.6",
"@ember/edition-utils": "^1.2.0",
"@ember/optional-features": "^2.0.0",
Expand Down Expand Up @@ -104,12 +87,6 @@
"ember-source": "~5.5.0",
"ember-template-lint": "^5.13.0",
"ember-web-app": "^5.0.0",
"eslint": "^8.55.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-ember": "^11.11.1",
"eslint-plugin-n": "^16.4.0",
"eslint-plugin-prettier": "^5.0.1",
"eslint-plugin-qunit": "^8.0.1",
"file-saver": "^2.0.5",
"ilios-common": "workspace:*",
"loader.js": "^4.7.0",
Expand All @@ -126,11 +103,6 @@
"sass": "^1.70.0",
"scroll-into-view": "^1.16.2",
"striptags": "^3.2.0",
"stylelint": "^15.11.0",
"stylelint-config-recommended-scss": "^13.1.0",
"stylelint-config-standard": "^34.0.0",
"stylelint-prettier": "^4.1.0",
"stylelint-scss": "^5.3.2",
"terser-webpack-plugin": "^5.3.9",
"testem-failure-only-reporter": "^1.0.0",
"tracked-built-ins": "^3.3.0",
Expand Down
1 change: 0 additions & 1 deletion packages/ilios-common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@
"validator": ">= 13.1.0"
},
"devDependencies": {
"@babel/eslint-parser": "7.23.3",
"@babel/plugin-proposal-decorators": "^7.23.6",
"@ember/edition-utils": "^1.1.1",
"@ember/optional-features": "^2.0.0",
Expand Down
6 changes: 0 additions & 6 deletions packages/test-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,10 @@
"build": "ember build --environment=production",
"start": "ember serve",
"test:ember": "ember test",
"test:ember:browserstack": "ember test --test-port=7774 --host=127.0.0.1 --config-file=testem.browserstack.js",
"test:percy": "percy exec -- pnpm run test:ember",
"browserstack:connect": "ember browserstack:connect",
"browserstack:disconnect": "ember browserstack:disconnect",
"browserstack:results": "ember browserstack:results",
"tryone": "ember try:one"
},
"devDependencies": {
"@babel/core": "^7.23.6",
"@babel/eslint-parser": "7.23.3",
"@babel/plugin-proposal-decorators": "^7.23.6",
"@ember/optional-features": "^2.0.0",
"@ember/string": "^3.1.1",
Expand Down
Loading

0 comments on commit 630fab3

Please sign in to comment.