Skip to content

Commit

Permalink
ci(GitHub): Add Super-Linter job
Browse files Browse the repository at this point in the history
  • Loading branch information
oboukli committed Aug 4, 2023
1 parent 3117141 commit 8aa7be2
Show file tree
Hide file tree
Showing 6 changed files with 76 additions and 12 deletions.
10 changes: 9 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ indent_style = tab
insert_final_newline = true
trim_trailing_whitespace = true

[*.{htmlhintrc,js,json,yml}]
[*.{htmlhintrc,js,json}]
charset = utf-8
end_of_line = lf
indent_size = 2
Expand All @@ -31,6 +31,14 @@ insert_final_newline = true
max_line_length = 80
trim_trailing_whitespace = true

[*.yml]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[*.{properties}]
charset = utf-8
end_of_line = lf
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/emscripten-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ jobs:

- name: Compute SHA512 of artifacts
run: |-
ls -Al ./scripts/litro/ | grep -v '^d'
ls -Al ./scripts/trmn/ | grep -v '^d'
ls -Al ./scripts/litro/
ls -Al ./scripts/trmn/
sha512sum --binary ./dist.tar
sha512sum --binary ./scripts/litro/litro-wasm.js
sha512sum --binary ./scripts/litro/litro-wasm.wasm
Expand Down
65 changes: 60 additions & 5 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,13 @@ on:
pull_request:
branches:
- main
paths:
- "**.md"
push:
branches:
- main
paths:
- "**.md"
workflow_dispatch:

permissions:
contents: read
contents: none

jobs:
markdownlint:
Expand All @@ -32,3 +28,62 @@ jobs:

- name: Run markdownlint
run: markdownlint .

superlinter:
name: Super-Linter
permissions:
contents: read
packages: read
statuses: write

Check failure

Code scanning / Scorecard

Token-Permissions High

score is 8: jobLevel 'statuses' permission set to 'write'
Remediation tip: Verify which permissions are needed and consider whether you can reduce them.
Click Remediation section below for further remediation help
runs-on: ubuntu-latest

steps:
- name: x
run: |-
apt-get update \
&& apt-get install gnupg wget -yq \
&& apt-get install software-properties-common -yq \
&& wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key| apt-key add - \
&& apt-get update \
&& add-apt-repository 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal main' \

Check warning

Code scanning / devskim

An HTTP-based URL without TLS was detected. Warning

Insecure URL
&& apt-get update \
&& apt-get install -yq \
autoconf-archive \
automake \
autotools-dev \
build-essential \
clang-format \
clang-tidy \
clang-tools \
clang \
cmake \
curl \
git \
lcov \
libboost-test-dev \
libsdl2-dev \
libtool \
pkg-config \
tar \
unzip \
valgrind \
zip \
&& rm -rf /var/lib/apt/lists/*
- name: Check out code
uses: actions/checkout@v3

Check warning

Code scanning / Scorecard

Pinned-Dependencies Medium

score is 7: GitHub-owned GitHubAction not pinned by hash
Click Remediation section below to solve this issue
with:
fetch-depth: 0
persist-credentials: false

- name: Run Super-Linter
uses: github/super-linter/slim@v5

Check warning

Code scanning / Scorecard

Pinned-Dependencies Medium

score is 7: GitHub-owned GitHubAction not pinned by hash
Click Remediation section below to solve this issue
env:
DEFAULT_BRANCH: main
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# HTML_FILE_NAME: ${{ github.workspace }}/.htmlhintrc
VALIDATE_ALL_CODEBASE: true
VALIDATE_CLANG_FORMAT: false
VALIDATE_HTML: false
VALIDATE_JAVASCRIPT_STANDARD: false
VALIDATE_JSCPD: false
6 changes: 3 additions & 3 deletions .github/workflows/linux-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ jobs:

- name: Compute SHA512 of artifacts
run: |-
ls -Al ./src/ | grep -v '^d'
ls -Al ./src/.libs/ | grep -v '^d'
ls -Al ./test/ | grep -v '^d'
ls -Al ./src/
ls -Al ./src/.libs/
ls -Al ./test/
sha512sum --binary ./src/.libs/libtromino.a
sha512sum --binary ./src/.libs/libtromino-gfx2d.a
sha512sum --binary ./src/.libs/libtromino-validation.a
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/macos-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ jobs:

- name: Compute SHA512 of artifacts
run: |-
ls -Al | grep -v '^d'
ls -Al
shasum --algorithm 512 --binary UnitTests
shasum --algorithm 512 --binary libSDL2-2.0.dylib
shasum --algorithm 512 --binary libtromino-validation.a
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
[![CodeQL](https://github.com/oboukli/tromino-puzzle/actions/workflows/codeql-analysis.yml/badge.svg?branch=main)](https://github.com/oboukli/tromino-puzzle/actions/workflows/codeql-analysis.yml?query=branch%3Amain)

[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=oboukli_tromino-puzzle&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=oboukli_tromino-puzzle)
[![GitHub Super-Linter](https://github.com/oboukli/tromino-puzzle/workflows/Lint%20Code%20Base/badge.svg)](https://github.com/marketplace/actions/super-linter)

This is a C99 library (see `src/core`) implementing a divide-and-conquer
algorithm, and a collection of apps (written in C17, C++17, and ECMAScript)
Expand Down

0 comments on commit 8aa7be2

Please sign in to comment.