Skip to content

Commit

Permalink
Run code quality checks on pull requests
Browse files Browse the repository at this point in the history
Make a workflow specific to code quality checks that runs on pull
requests
Fix errors causing code quality checks to fail

closes #1272
  • Loading branch information
TangoYankee committed Sep 27, 2024
1 parent b89bf68 commit 66e3c9c
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 12 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/code-quality.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: 🚧 Check code quality
on:
pull_request:

jobs:
test-client:
name: 🧪 Test client code
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
sparse-checkout: client
- uses: actions/setup-node@v1
with:
node-version: 12.x
- name: install dependencies
run: yarn install --frozen-lockfile --non-interactive
working-directory: client
- name: build
env:
DISABLE_SOURCE_MAPS: true
BROCCOLI_ENV: production
run: yarn build
working-directory: client
- name: test
run: yarn test
working-directory: client
24 changes: 12 additions & 12 deletions client/config/environment.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
module.exports = function(environment) {
const ENV = {
modulePrefix: "client",
modulePrefix: 'client',
environment,
rootURL: "/",
locationType: "auto",
rootURL: '/',
locationType: 'auto',
host: getHost(environment),
NYCIDDomain: getOAuthDomain(environment),
NYCIDLocation: getOAuthLoginEndpoint(environment),
Expand All @@ -22,9 +22,9 @@ module.exports = function(environment) {
},
fontawesome: {
icons: {
"free-brands-svg-icons": "all",
"free-regular-svg-icons": "all",
"free-solid-svg-icons": "all",
'free-brands-svg-icons': 'all',
'free-regular-svg-icons': 'all',
'free-solid-svg-icons': 'all',
},
},

Expand All @@ -33,10 +33,10 @@ module.exports = function(environment) {
// when it is created
},

"labs-search": {
host: "https://search-api-production.herokuapp.com",
route: "search",
helpers: ["geosearch-v2", "bbl"],
'labs-search': {
host: 'https://search-api-production.herokuapp.com',
route: 'search',
helpers: ['geosearch-v2', 'bbl'],
},
};

Expand Down Expand Up @@ -142,6 +142,6 @@ function getMaintenanceTimes() {
return [MAINTENANCE_START, MAINTENANCE_END];
}

function getFeatureFlagSelfService() {
return process.env.FEATURE_FLAG_SELF_SERVICE === "ON";
function getFeatureFlagSelfService() {
return process.env.FEATURE_FLAG_SELF_SERVICE === 'ON';
}

0 comments on commit 66e3c9c

Please sign in to comment.