Skip to content

Commit

Permalink
added circleci as gh action YAML
Browse files Browse the repository at this point in the history
Signed-off-by: krishnaduttPanchagnula <krishnadutt123@gmail.com>
  • Loading branch information
krishnaduttPanchagnula committed Jun 7, 2023
1 parent b8cb86a commit 0c453a2
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/Circle-ci.yml
@@ -0,0 +1,48 @@
name: Test and Lint

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
test:
runs-on: ubuntu-latest

strategy:
matrix:
go_version: ["1.18", "1.19", "1.20"]
run_lint: [true, true, true]
run_style_and_unused: [false, false, true]

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Go ${{ matrix.go_version }}
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go_version }}

- name: Cache Go modules
id: cache
uses: actions/cache@v3
with:
path: ~/go/pkg/mod
key: v1-go${{ matrix.go_version }}

- name: Run tests and check license
run: make check_license test
env:
CI: true

- name: Run lint
if: ${{ matrix.run_lint == true && startsWith(matrix.go_version, '1.') }}
run: make lint

- name: Run style and unused
if: ${{ matrix.run_style_and_unused == true && matrix.go_version == '1.20' }}
run: make style unused

0 comments on commit 0c453a2

Please sign in to comment.