Skip to content

Commit

Permalink
Pipeline fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
eminmuhammadi committed Jun 7, 2022
1 parent 251e1d7 commit c26a729
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 63 deletions.
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: eminmuhammadi
94 changes: 31 additions & 63 deletions .github/workflows/pipeline.yaml
Original file line number Diff line number Diff line change
@@ -1,71 +1,39 @@
name: "DaVinci Development Pipeline"

on:
push:
branches: ["master"]
pull_request:
branches: ["master"]

on: [push, pull_request]
name: Test
jobs:
build:
runs-on: ubuntu-latest
test:
strategy:
matrix:
go-version: [1.17.x, 1.18.x]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2

- name: Set up Go
uses: actions/setup-go@v2
- uses: actions/setup-go@v3
with:
go-version: 1.16
go-version: ${{ matrix.go-version }}
- uses: actions/checkout@v3
- run: go test ./...

- name: Verify dependencies
run: go mod verify

- name: Install
run: go install

- name: Build
run: go build -v ./...

- name: Run go vet
run: go vet ./...

lint:
test-cache:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Set up Go
uses: actions/setup-go@v2
- uses: actions/setup-go@v3
with:
go-version: 1.16

- name: Verify dependencies
run: go mod verify

- name: Install
run: go install

- name: Install golint
run: go install golang.org/x/lint/golint@latest

- name: Run golint
run: golint ./...

test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Set up Go
uses: actions/setup-go@v2
go-version: 1.18.x
- uses: actions/checkout@v3
- uses: actions/cache@v2
with:
go-version: 1.16

- name: Verify dependencies
run: go mod verify

- name: Install
run: go install

- name: Run tests
run: go test -race -vet=off ./...
# In order:
# * Module download cache
# * Build cache (Linux)
# * Build cache (Mac)
# * Build cache (Windows)
path: |
~/go/pkg/mod
~/.cache/go-build
~/Library/Caches/go-build
~\AppData\Local\go-build
key: ${{ runner.os }}-go-${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-${{ matrix.go-version }}-
- run: go test ./...

0 comments on commit c26a729

Please sign in to comment.