Update nvuillam/mega-linter action to v7.11.1 #770
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: "GitHub CI" | |
permissions: | |
contents: read | |
pull-requests: write | |
actions: read | |
issues: read | |
discussions: write | |
repository-projects: write | |
checks: write | |
on: | |
pull_request: | |
branches: [master] | |
jobs: | |
clj-kondo: | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
container: cljkondo/clj-kondo:2024.03.13-alpine | |
steps: | |
- uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3 | |
- name: Run clj-kondo | |
run: >- | |
clj-kondo | |
--config .clj-kondo/config.edn | |
--config-dir .clj-kondo | |
--parallel | |
--lint src test | |
cljstyle: | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
container: abogoyavlensky/cljstyle:0.15.0 | |
steps: | |
- uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3 | |
- name: Check with cljstyle | |
run: cljstyle check --report | |
megalinter: | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
steps: | |
- uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3 | |
- name: Mega-Linter | |
id: ml | |
uses: nvuillam/mega-linter/flavors/[email protected] | |
env: | |
# All available variables are described in documentation | |
# https://nvuillam.github.io/mega-linter/configuration/ | |
VALIDATE_ALL_CODEBASE: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} # Validates all source when push on master, else just the git diff with master. Override with true if you always want to lint all sources | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# Upload Mega-Linter artifacts | |
- name: Archive production artifacts | |
if: ${{ success() }} || ${{ failure() }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Mega-Linter reports | |
path: | | |
report | |
mega-linter.log | |
build: | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
fetch-depth: 0 | |
- name: Set up JDK 17 | |
uses: actions/[email protected] | |
with: | |
distribution: zulu | |
java-version: 17 | |
- name: Restore local Maven repository from cache | |
uses: actions/cache@v4 | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}-maven-${{ hashFiles( 'project.clj' ) }} | |
restore-keys: | | |
${{ runner.os }}-maven- | |
- name: Generate proto files | |
run: lein protodeps generate | |
- name: Build uberjar | |
run: lein uberjar | |
test: | |
needs: | |
- build | |
- clj-kondo | |
- cljstyle | |
- megalinter | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3 | |
- name: Set up JDK 17 | |
uses: actions/[email protected] | |
with: | |
distribution: zulu | |
java-version: 17 | |
- name: Restore local Maven repository from cache | |
uses: actions/cache@v4 | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}-maven-${{ hashFiles( 'project.clj' ) }} | |
restore-keys: | | |
${{ runner.os }}-maven- | |
- name: Generate proto files | |
run: lein protodeps generate | |
- name: Unit tests | |
env: | |
IP_STACK_ACCESS_KEY: ${{ secrets.IP_STACK_ACCESS_KEY }} | |
run: lein cloverage --html --lcov --junit | |
- name: Publish Unit Test Results | |
uses: EnricoMi/[email protected] | |
if: always() | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
files: "target/coverage/junit.xml" | |
- name: Coveralls | |
uses: coverallsapp/github-action@3dfc5567390f6fa9267c0ee9c251e4c8c3f18949 # v2.2.3 | |
with: | |
path-to-lcov: "target/coverage/lcov.info" | |
github-token: ${{ secrets.GITHUB_TOKEN }} |