From 781ea2802473fd7aff2a92cb16244be57472a085 Mon Sep 17 00:00:00 2001 From: Krishna Dutt Panchagnula Date: Thu, 8 Jun 2023 15:21:42 +0530 Subject: [PATCH] added circleci as gh action YAML (#1281) * added circleci as gh action YAML Signed-off-by: krishnaduttPanchagnula * merged all changes into one Signed-off-by: krishnaduttPanchagnula --------- Signed-off-by: krishnaduttPanchagnula --- .github/workflows/Circle-ci.yml | 45 +++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .github/workflows/Circle-ci.yml diff --git a/.github/workflows/Circle-ci.yml b/.github/workflows/Circle-ci.yml new file mode 100644 index 0000000..e7202af --- /dev/null +++ b/.github/workflows/Circle-ci.yml @@ -0,0 +1,45 @@ +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"] + + 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 + run: make lint + + - name: Run style and unused + if: ${{ matrix.go_version == '1.20' }} + run: make style unused \ No newline at end of file