-
Notifications
You must be signed in to change notification settings - Fork 9
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
linting + CI #96
linting + CI #96
Conversation
Codecov Report
@@ Coverage Diff @@
## main #96 +/- ##
==========================================
+ Coverage 78.52% 78.84% +0.31%
==========================================
Files 7 7
Lines 503 501 -2
==========================================
Hits 395 395
+ Misses 108 106 -2
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
@@ -46,10 +46,6 @@ exclude = ["tests*"] # exclude packages matching these glob patterns (empty by | |||
[tool.setuptools_scm] | |||
root = "../../.." | |||
|
|||
[tool.black] | |||
line-length = 120 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this might be good to retain, as the default line limit of 80 is quite short.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i can revert this if you desire
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a blocker: Yes, please, if it isn't too much trouble.
frontend/.happy/config.json
Outdated
"auth_method": "eks" | ||
}, | ||
"terraform_directory": ".happy/terraform/envs/prod", | ||
"task_launch_type": "k8s" | ||
}, | ||
"api": {}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like this might be more than linting changes. Pulling in the changes from the main might help fix that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like some of the keys are sorted differently 🤔 I wonder if prettier or eslint did this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
overall lgtm! left a few comments 🦙
frontend/.happy/config.json
Outdated
"auth_method": "eks" | ||
}, | ||
"terraform_directory": ".happy/terraform/envs/prod", | ||
"task_launch_type": "k8s" | ||
}, | ||
"api": {}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like some of the keys are sorted differently 🤔 I wonder if prettier or eslint did this
.github/workflows/frontend-tests.yml
Outdated
- name: Install PNPM | ||
uses: pnpm/action-setup@v2 | ||
with: | ||
version: 8.9.0 | ||
- name: Install dependencies with PNPM | ||
run: pnpm install --frozen-lockfile |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could we leverage the pnpm cache here? there's an example in the action README: https://github.com/pnpm/action-setup#use-cache-to-reduce-installation-time
jobs:
tests:
steps:
- uses: pnpm/action-setup@v2
name: Install pnpm
with:
version: 8.9.0
run_install: false
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install
.pre-commit-config.yaml
Outdated
- repo: https://github.com/pre-commit/mirrors-prettier | ||
rev: v3.0.3 | ||
hooks: | ||
- id: prettier | ||
files: frontend |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you verify that this doesn't install anything with npm install
? I'm looking at the code for this and it looks like it's using language: node
which does setup an environment using npm install
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this does use npm install
I would assume. we can circumvent this by deleting it and letting the pnpm lint
command run it instead
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.9' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Do we need this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
technically not, no
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a blocker: We could remove it.
@@ -46,10 +46,6 @@ exclude = ["tests*"] # exclude packages matching these glob patterns (empty by | |||
[tool.setuptools_scm] | |||
root = "../../.." | |||
|
|||
[tool.black] | |||
line-length = 120 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a blocker: Yes, please, if it isn't too much trouble.
217358b
to
dc34d90
Compare
the workflow is failing for reasons i cannot reproduce locally... id rather just merge it in now and maybe we can fix it later since it's mainly meant as a warning |
adds linting (including pre-commit) and workflows for running linting and tests: