Skip to content

Commit

Permalink
chore: format using Make (#2736)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevgo authored Sep 16, 2022
1 parent 60f4a2c commit 20fdfe8
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 7 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Format

on:
pull_request:
push:

jobs:
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.18
- run: make format
- name: Indicate formatting issues
run: git diff HEAD --exit-code --color
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,9 @@ docs/swagger:
bash <(curl https://raw.githubusercontent.com/ory/meta/master/install.sh) -d -b .bin ory v0.1.33
touch -a -m .bin/ory

node_modules: package.json Makefile
node_modules: package.json
npm ci
touch node_modules

.bin/golangci-lint: Makefile
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -d -b .bin v1.47.3
Expand Down Expand Up @@ -136,7 +137,7 @@ quickstart-dev:
.PHONY: format
format: .bin/goimports node_modules
goimports -w -local github.com/ory .
npm run format
npm exec -- prettier --write 'test/e2e/**/*{.ts,.js}'

# Build local docker image
.PHONY: docker
Expand Down
6 changes: 1 addition & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
{
"private": true,
"scripts": {
"format": "prettier --write ${npm_package_config_prettierTarget}",
"format:check": "prettier --check ${npm_package_config_prettierTarget}",
"format": "",
"openapi-generator-cli": "openapi-generator-cli",
"test": "cypress run --browser chrome",
"test:watch": "cypress open --browser chrome",
"text-run": "exit 0",
"wait-on": "wait-on"
},
"config": {
"prettierTarget": "test/e2e/**/*{.ts,.js}"
},
"prettier": "ory-prettier-styles",
"dependencies": {
"@openapitools/openapi-generator-cli": "^2.1.18",
Expand Down

0 comments on commit 20fdfe8

Please sign in to comment.