-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: fix validation pipeline and add paths
- Loading branch information
1 parent
fc18f42
commit c0a9066
Showing
3 changed files
with
44 additions
and
42 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 |
---|---|---|
@@ -1,9 +1,10 @@ | ||
name: Run tests Go | ||
name: Go | ||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
branch: main | ||
branches: [main] | ||
types: [ opened, reopened, synchronize ] | ||
paths: [go] | ||
|
||
permissions: | ||
contents: read # for checkout | ||
|
@@ -14,7 +15,7 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Install Go | ||
|
@@ -28,4 +29,16 @@ jobs: | |
docker-compose up -d | ||
popd | ||
- name: Run tests | ||
run: cd go && make run-tests | ||
run: cd go && make run-tests | ||
lint: | ||
name: Check code format for Go | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Install Go | ||
uses: actions/[email protected] | ||
- name: Run gofmt | ||
run: cd go && make check-format |
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 |
---|---|---|
@@ -1,54 +1,26 @@ | ||
name: Validate | ||
on: | ||
pull_request: | ||
branch: main | ||
branches: [main] | ||
types: [ opened, reopened, synchronize ] | ||
|
||
permissions: | ||
contents: read # for checkout | ||
|
||
jobs: | ||
lint-go: | ||
name: Check code format for Go | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Install Go | ||
uses: actions/[email protected] | ||
- name: Run gofmt | ||
run: cd go && make check-format | ||
lint-js: | ||
name: Check code format for JavaScript | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: "lts/*" | ||
- name: Install dependencies | ||
run: cd js && yarn install | ||
- name: Prepare environment | ||
run: cd js && yarn lint:check | ||
commits: | ||
name: Check commits | ||
runs-on: ubuntu-latest | ||
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: "lts/*" | ||
- name: Install dependencies | ||
run: npm install -g @commitlint/cli @commitlint/config-conventional | ||
run: npm install -g @commitlint/cli@18.6.1 @commitlint/config-conventional@18.6.2 | ||
- name: Configure | ||
run: | | ||
echo 'module.exports = {"extends": ["@commitlint/config-conventional"]}' > commitlint.config.js | ||
|
@@ -65,13 +37,13 @@ jobs: | |
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: "lts/*" | ||
- name: Install dependencies | ||
run: npm install -g @commitlint/cli @commitlint/config-conventional | ||
run: npm install -g @commitlint/cli@18.6.1 @commitlint/config-conventional@18.6.2 | ||
- name: Configure | ||
run: | | ||
echo 'module.exports = {"extends": ["@commitlint/config-conventional"]}' > commitlint.config.js | ||
|