-
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.
Renamed gitlab to github and added workflows
- Loading branch information
Showing
3 changed files
with
110 additions
and
2 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,15 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "gomod" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
reviewers: | ||
- "Fank" | ||
|
||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
reviewers: | ||
- "Fank" |
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,93 @@ | ||
name: Go | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- master | ||
pull_request: | ||
|
||
permissions: | ||
contents: read | ||
pull-requests: read | ||
|
||
jobs: | ||
golangci: | ||
name: lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version-file: ./go.mod | ||
|
||
- name: Set up Golang build cache | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/.cache/go-build | ||
key: ${{ runner.os }}-golang-golangci-lint-${{ hashFiles('**/go.sum') }} | ||
restore-keys: | | ||
${{ runner.os }}-golang- | ||
- name: golangci-lint | ||
uses: golangci/golangci-lint-action@v6 | ||
with: | ||
version: latest | ||
|
||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version-file: ./go.mod | ||
|
||
- name: Set up Golang build cache | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/.cache/go-build | ||
key: ${{ runner.os }}-golang-test-${{ hashFiles('**/go.sum') }} | ||
restore-keys: | | ||
${{ runner.os }}-golang- | ||
- name: Download go modules | ||
run: go mod download | ||
|
||
- name: Test | ||
uses: robherley/go-test-action@v0 | ||
with: | ||
testArguments: ./... | ||
|
||
license-check: | ||
runs-on: ubuntu-latest | ||
name: License Check | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version-file: ./go.mod | ||
|
||
- name: Install go-licenses | ||
run: go install github.com/google/go-licenses@latest | ||
shell: bash | ||
|
||
- name: Check licenses | ||
run: > | ||
go-licenses check ./... | ||
--ignore ${{ github.repository }} | ||
shell: bash | ||
|
||
- name: Get licenses list | ||
run: > | ||
go-licenses csv ./... | ||
--ignore ${{ github.repository }} | ||
shell: bash |
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,3 +1,3 @@ | ||
module gitlab.com/mclgmbh/golang-pkg/aftership | ||
module github.com/enthus-golang/aftership | ||
|
||
go 1.13 | ||
go 1.22 |