-
-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split linting into new github actions
- Loading branch information
1 parent
a6059e4
commit 98a6a62
Showing
3 changed files
with
65 additions
and
13 deletions.
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,36 @@ | ||
name: go-lint | ||
on: | ||
push: | ||
branches: [ main, master ] | ||
pull_request: | ||
branches: [ main, master ] | ||
|
||
permissions: | ||
contents: read | ||
# Optional: allow read access to pull request. Use with `only-new-issues` option. | ||
# pull-requests: read | ||
|
||
jobs: | ||
lint: | ||
strategy: | ||
matrix: | ||
go: [ '1.20' ] | ||
os: [ ubuntu-latest ] | ||
name: lint | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-go@v4 | ||
with: | ||
go-version: ${{ matrix.go }} | ||
|
||
- name: Check formatting | ||
uses: Jerome1337/[email protected] | ||
with: | ||
gofmt-path: '.' | ||
gofmt-flags: '-l -d' | ||
|
||
- name: Goimports Check | ||
uses: DarthBenro008/[email protected] | ||
with: | ||
root-path: './' |
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 |
---|---|---|
|
@@ -41,7 +41,7 @@ jobs: | |
node-version: ${{ matrix.node-version }} | ||
|
||
- name: Set up Go ${{ matrix.go-version }} | ||
uses: actions/setup-go@v3 | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: ${{ matrix.go-version }} | ||
id: go | ||
|
@@ -50,7 +50,6 @@ jobs: | |
uses: actions/checkout@v3 | ||
|
||
- run: npm ci --no-optional | ||
- run: npm run prettier | ||
# - run: npm test | ||
- run: npm run build | ||
env: | ||
|
@@ -68,17 +67,6 @@ jobs: | |
- name: Generate swagger docs | ||
run: swag init -g http/http.go -o swaggerdocs | ||
|
||
- name: Check formatting | ||
uses: Jerome1337/[email protected] | ||
with: | ||
gofmt-path: '.' | ||
gofmt-flags: '-l -d' | ||
|
||
- name: Goimports Check | ||
uses: DarthBenro008/[email protected] | ||
with: | ||
root-path: './' | ||
|
||
- name: Test | ||
run: go test `go list ./... | grep -v swaggerdocs` | ||
|
||
|
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,28 @@ | ||
name: ui-lint | ||
|
||
on: | ||
push: | ||
branches: [ main, master ] | ||
pull_request: | ||
branches: [ main, master ] | ||
|
||
jobs: | ||
build: | ||
timeout-minutes: 30 | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
node-version: [ "18.5.0" ] | ||
|
||
steps: | ||
- name: Set up Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
- name: Check out code | ||
uses: actions/checkout@v3 | ||
|
||
- run: npm ci --no-optional | ||
- run: npm run prettier |