Skip to content

Add CircleCI configuration #31

Add CircleCI configuration

Add CircleCI configuration #31

Workflow file for this run

name: CI
on:
- push
permissions:
issues: write
pull-requests: write
# For GitHub Comment Reporter
# https://megalinter.io/latest/reporters/GitHubCommentReporter/
jobs:
Mega-Linter:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# Mega-Linter
- name: Mega-Linter
id: ml
# You can override Mega-Linter flavor used to have faster performances
# More info at https://megalinter.io/flavors/
uses: oxsecurity/megalinter/flavors/go@v7
env:
# All available variables are described in documentation
# https://megalinter.io/config-file/
VALIDATE_ALL_CODEBASE: true
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Upload Mega-Linter artifacts
- name: Archive production artifacts
if: ${{ success() }} || ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: Mega-Linter reports
path: |
megalinter-reports
mega-linter.log
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
go-version:
- 1.13
- 1.14
- 1.15
- 1.16
- 1.17
- 1.18
- 1.19
steps:
- uses: actions/checkout@v3
- name: Setup Go ${{ matrix.go-version }}
uses: actions/setup-go@v4
with:
go-version: "${{ matrix.go-version }}"
- name: Test
run: |
go test -coverprofile=coverage.txt -covermode=atomic ./...
- name: Coverage
uses: codecov/codecov-action@v3
with:
verbose: true