-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2144ff6
commit 8138576
Showing
2 changed files
with
75 additions
and
1 deletion.
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,74 @@ | ||
name: "Disgoform" | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- "disgoform.go" | ||
- "go.mod" | ||
- "go.sum" | ||
|
||
pull_request: | ||
types: | ||
- opened | ||
- synchronize | ||
branches: | ||
- v10 | ||
paths: | ||
- "disgoform.go" | ||
- "go.mod" | ||
- "go.sum" | ||
|
||
jobs: | ||
sca-lint: | ||
name: Static Code Analysis | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository code | ||
uses: actions/checkout@v3 | ||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version-file: go.mod | ||
- name: Run golangci-lint | ||
uses: golangci/golangci-lint-action@v3 | ||
with: | ||
version: v1.64.5 | ||
|
||
test-unit: | ||
needs: sca-lint | ||
name: Unit Tests | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: | ||
- ubuntu-latest | ||
steps: | ||
- name: Checkout repository code | ||
uses: actions/checkout@v3 | ||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version-file: go.mod | ||
- name: Run Unit Tests | ||
run: go test ./tests/unit_test.go | ||
|
||
test-integration: | ||
needs: test-unit | ||
name: Integration Tests | ||
environment: testing | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository code | ||
uses: actions/checkout@v3 | ||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version-file: go.mod | ||
- name: Run Integration Tests | ||
env: | ||
TOKEN: ${{ secrets.TOKEN }} | ||
APPID: ${{ secrets.APPID }} | ||
GUILDID: ${{ secrets.GUILDID }} | ||
run: go test ./tests/integration_test.go |
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