-
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
Merged
Merged
Changes from all commits
Commits
Show all changes
39 commits
Select commit
Hold shift + click to select a range
7992220
chore: reconfigured trigger conditions for precommit action
BallardRobinett 90fa9f6
chore: added this branch to push list
BallardRobinett 3fda2f5
chore: modified PR condition and updated action
BallardRobinett 2e9e626
chore: added dev-env-setup action
BallardRobinett 1c40c85
chore: comment out backend setup code
BallardRobinett ab5ab96
chore: add requirements.txt
BallardRobinett 79803b9
add config file
BallardRobinett 9c8eb02
chore: added precommit config files
BallardRobinett b40f463
chore: modified config files
BallardRobinett f28076d
chore: update tsconfig
BallardRobinett 1f9d7bf
chore: add config file and uncomment backend config
BallardRobinett 9af1253
chore: add bc_ops makefile
BallardRobinett ad8912e
chore: add bc_ops tool versions file
BallardRobinett 4978658
chore: update Makefile
BallardRobinett f4976e2
chore: adding test pre-commit workflow
BallardRobinett e20d39e
chore: switched to different precommit worklow template
BallardRobinett 80d851e
chore: added eslint to yarn, modified pre commit config
BallardRobinett 09398f3
chore: update python version
BallardRobinett 91e54d2
chore: changes from running prettier on all files
BallardRobinett e50d184
chore: trying to find why error is happening
BallardRobinett 8a0526c
chore: init eslint
BallardRobinett 1cd7cb5
chore: trying some changes to config files
BallardRobinett 0eaaff9
make yarn install happen in workflow
BallardRobinett b041a13
chore: adding eslint manually
BallardRobinett 720b03d
chore: modify pre commit config
BallardRobinett 793b67d
chore: try installing eslint from config
BallardRobinett a7e3401
chore: add eslint workflow
BallardRobinett 50f57e4
chore: remove eslint from precommit workflow
BallardRobinett 767568f
chore: adding prettier changes
BallardRobinett c0c9f6a
chore: update package versions
BallardRobinett 2ccb1a6
chore: change bc_obps to server dir
BallardRobinett 703301c
chore: update packages eslint
BallardRobinett c1ddb32
chore: remove unnecessary packages
BallardRobinett ca91aeb
chore: remove workflow condition specific to this branch
BallardRobinett 7d0b73b
chore: removed unused packages
BallardRobinett 2093bc8
chore: reinstall yarn packages and commit yarn lock
BallardRobinett 1b081b8
chore: readd eslint to package.json
BallardRobinett 73f8bfc
chore: modify eslint to run on client dir
BallardRobinett dc22a87
chore: delete bc_obps dir (replaced by server dir)
BallardRobinett File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euxo pipefail | ||
|
||
pushd client || exit 1 | ||
files=("$@") | ||
files=("${files[@]/#/../}") # add ../ to each element | ||
|
||
# --ignore-unknown prevents prettier from complaining about file types it doesn't know about | ||
yarn run prettier --ignore-unknown --write "${files[@]}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euxo pipefail | ||
|
||
pushd client || exit 1 | ||
files=("$@") | ||
files=("${files[@]/#/../}") # add ../ to each element | ||
|
||
yarn run eslint -c ./.eslintrc.js "${files[@]}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
module.exports = { | ||
env: { | ||
browser: true, | ||
es2021: true, | ||
}, | ||
extends: "plugin:react/recommended", | ||
overrides: [ | ||
{ | ||
env: { | ||
node: true, | ||
}, | ||
files: [".eslintrc.{js,cjs}"], | ||
parserOptions: { | ||
sourceType: "script", | ||
}, | ||
}, | ||
], | ||
parser: "@typescript-eslint/parser", | ||
parserOptions: { | ||
ecmaVersion: "latest", | ||
sourceType: "module", | ||
}, | ||
plugins: ["@typescript-eslint", "react"], | ||
rules: {}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: "Set up registration dev environment" | ||
description: "Sets up asdf and configures the cache" | ||
runs: | ||
using: composite | ||
steps: | ||
- name: asdf setup | ||
uses: asdf-vm/actions/setup@v3 | ||
- uses: actions/cache@v4 | ||
id: asdf-cache-client | ||
with: | ||
path: | | ||
~/.asdf | ||
./client/.tool-versions | ||
key: ${{ runner.os }}-asdf-cache-client-${{ hashFiles('client/.tool-versions') }} | ||
- uses: actions/cache@v3 | ||
id: asdf-cache-backend | ||
with: | ||
path: | | ||
~/.asdf | ||
./server/.tool-versions | ||
key: ${{ runner.os }}-asdf-cache-backend-${{ hashFiles('server/.tool-versions') }} | ||
- uses: actions/cache@v3 | ||
id: yarn-cache | ||
with: | ||
path: | | ||
~/.cache/yarn | ||
./client/node_modules | ||
key: ${{ runner.os }}-yarn-cache-${{ hashFiles('client/yarn.lock') }}-v2 | ||
- name: Set up python | ||
id: setup-python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.9" | ||
- name: Install Poetry | ||
uses: snok/install-poetry@v1 | ||
- name: Load cached venv | ||
id: cached-poetry-dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: .venv | ||
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} | ||
#---------------------------------------------- | ||
# install dependencies if cache does not exist | ||
#---------------------------------------------- | ||
- name: Install dependencies | ||
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | ||
run: poetry install --no-interaction --no-root | ||
working-directory: ./server | ||
shell: bash | ||
- name: Install server dev tools | ||
working-directory: ./server | ||
shell: bash | ||
run: | | ||
make install_backend_asdf_tools | ||
make start_pg | ||
make create_db |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: ESLint | ||
|
||
on: | ||
push: | ||
branches: [main, develop] | ||
pull_request: | ||
branches: [main, develop] | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
- name: Install dependencies | ||
run: | | ||
cd client | ||
yarn install | ||
|
||
- name: Run ESLint | ||
run: | | ||
cd client | ||
yarn run eslint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,35 +2,14 @@ name: Precommit tests | |
|
||
on: | ||
push: | ||
branches: | ||
- '*' | ||
branches: [main, develop] | ||
pull_request: | ||
branches: | ||
- '*' | ||
branches: [main, develop] | ||
|
||
jobs: | ||
pre-commit: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We need to remove the dependency on |
||
needs: install-dev-tools | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: dev env setup | ||
uses: ./.github/actions/dev-env-setup | ||
- name: set pre-commit cache directory | ||
run: | | ||
echo "PRE_COMMIT_HOME=$GITHUB_WORKSPACE/.pre-commit-cache" >> $GITHUB_ENV | ||
- name: set PY | ||
run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV | ||
- name: create commitlint COMMIT_EDITMSG if not exists | ||
run: | | ||
if test -f ".git/COMMIT_EDITMSG"; then | ||
echo "COMMIT_EDITMSG EXISTS, skipping" | ||
else | ||
touch .git/COMMIT_EDITMSG | ||
fi | ||
- uses: actions/cache@v3 | ||
with: | ||
path: | | ||
./.pre-commit-cache | ||
key: pre-commit-${{ env.PY }}-${{ hashFiles('.pre-commit-config.yaml') }}-v3 | ||
- run: pre-commit run --all-files | ||
- uses: actions/setup-python@v5 | ||
- uses: pre-commit/action@v3.0.0 |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
anddevelop
too (at least that's how it's setup everywhere else)