-
Notifications
You must be signed in to change notification settings - Fork 0
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: reconfigured trigger conditions for precommit action #128
Conversation
@@ -2,11 +2,8 @@ name: Precommit tests | |||
|
|||
on: | |||
push: | |||
branches: | |||
- '*' | |||
branches: [main, develop] | |||
pull_request: |
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.
you'll want PR only on main
and develop
too (at least that's how it's setup everywhere else)
pull_request: | ||
branches: | ||
- '*' | ||
|
||
jobs: | ||
pre-commit: |
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.
We need to remove the dependency on install_dev_tools
or import that job too if it's necessary
eddddb7
to
767568f
Compare
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.
Nice work! A bunch of small version changes, mostly
using: composite | ||
steps: | ||
- name: asdf setup | ||
uses: asdf-vm/actions/setup@v1 |
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.
uses: asdf-vm/actions/setup@v1 | |
uses: asdf-vm/actions/setup@v3 |
steps: | ||
- name: asdf setup | ||
uses: asdf-vm/actions/setup@v1 | ||
- uses: actions/cache@v3 |
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.
- uses: actions/cache@v3 | |
- uses: actions/cache@v4 |
with: | ||
path: | | ||
~/.asdf | ||
./bc_obps/.tool-versions |
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.
Once you rebase:
./bc_obps/.tool-versions | |
./server/.tool-versions |
key: ${{ runner.os }}-yarn-cache-${{ hashFiles('client/yarn.lock') }}-v2 | ||
- name: Set up python | ||
id: setup-python | ||
uses: actions/setup-python@v4 |
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.
uses: actions/setup-python@v4 | |
uses: actions/setup-python@v5 |
id: setup-python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.9.16" |
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.
Probably enough to specify the minor to make sure we get the updates without work on our end
python-version: "3.9.16" | |
python-version: "3.9" |
.github/workflows/eslint.yaml
Outdated
with: | ||
node-version: 20 | ||
- name: Install dependencies | ||
run: yarn 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.
I wonder if there's a lot of value in running eslint over the entire repository, we might be better off scoping this to the client directory (and this way we avoid installing packages at the root of the project)
.github/workflows/precommit.yaml
Outdated
@@ -2,35 +2,14 @@ name: Precommit tests | |||
|
|||
on: | |||
push: | |||
branches: | |||
- '*' | |||
branches: [main, develop, 127-fix-precommit-conditions] |
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.
branches: [main, develop, 127-fix-precommit-conditions] | |
branches: [main, develop] |
.github/workflows/precommit.yaml
Outdated
./.pre-commit-cache | ||
key: pre-commit-${{ env.PY }}-${{ hashFiles('.pre-commit-config.yaml') }}-v3 | ||
- run: pre-commit run --all-files | ||
- uses: actions/setup-python@v3 |
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.
- uses: actions/setup-python@v3 | |
- uses: actions/setup-python@v5 |
This also needs a version for python
package.json
Outdated
"@typescript-eslint/eslint-plugin": "^6.21.0", | ||
"@typescript-eslint/parser": "^6.21.0", |
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.
These would likely be better housed in the package.json
in the client folder
package.json
Outdated
"dependencies": { | ||
"eslint": "^8.56.0", | ||
"pre-commit": "^1.2.2", | ||
"typescript": "^5.3.3" | ||
} |
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.
There aren't any dependencies that need to be shipped in this package either, I don't think these are needed here
54898f8
to
767568f
Compare
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 good! The eslint workflow could probably use some caching, but let's put that in a tech debt card. Nice work!
Issue: #127
Reconfigured the trigger conditions for precommit. It should be on push for main and develop, and on PR to any branch.
To test: create a PR and see if precommit runs.