Skip to content

Update actions/upload-artifact action to v6 #257

Update actions/upload-artifact action to v6

Update actions/upload-artifact action to v6 #257

Workflow file for this run

name: CI
on:
push:
pull_request:
branches:
- main
- master
permissions: read-all
jobs:
MegaLinter:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
# For GitHub Comment Reporter
# https://megalinter.io/latest/reporters/GitHubCommentReporter/
steps:
- uses: actions/checkout@v4
# MegaLinter
- name: MegaLinter
id: ml
# You can override MegaLinter flavor used to have faster performances
# More info at https://megalinter.io/flavors/
uses: oxsecurity/megalinter/flavors/go@v8
env:
# All available variables are described in documentation
# https://megalinter.io/config-file/
VALIDATE_ALL_CODEBASE: true
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# https://megalinter.io/latest/reporters/ApiReporter/
API_REPORTER: true
API_REPORTER_URL: ${{ secrets.API_REPORTER_URL }}
API_REPORTER_BASIC_AUTH_USERNAME: ${{ secrets.API_REPORTER_BASIC_AUTH_USERNAME }}
API_REPORTER_BASIC_AUTH_PASSWORD: ${{ secrets.API_REPORTER_BASIC_AUTH_PASSWORD }}
API_REPORTER_METRICS_URL: ${{ secrets.API_REPORTER_METRICS_URL }}
API_REPORTER_METRICS_BASIC_AUTH_USERNAME: ${{ secrets.API_REPORTER_METRICS_BASIC_AUTH_USERNAME }}
API_REPORTER_METRICS_BASIC_AUTH_PASSWORD: ${{ secrets.API_REPORTER_METRICS_BASIC_AUTH_PASSWORD }}
API_REPORTER_DEBUG: false
# Upload MegaLinter artifacts
- name: Archive production artifacts
if: success() || failure()
uses: actions/upload-artifact@v5
with:
name: MegaLinter reports
path: |
megalinter-reports
mega-linter.log
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
go-version:
- "1.14"
- "1.15"
- "1.16"
- "1.17"
- "1.18"
- "1.19"
- "1.20"
- "1.21"
- "1.22"
- "1.23"
- "1.24"
steps:
- uses: actions/checkout@v4
- name: Setup Go ${{ matrix.go-version }}
uses: actions/setup-go@v5
with:
go-version: "${{ matrix.go-version }}"
- name: Test
run: |
go test -coverprofile=coverage.txt -covermode=atomic ./...
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
files: coverage.txt
verbose: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}