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 Jun 8, 2023
1 parent 765ffe1 commit b44b2c6
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 20 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/emscripten-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ jobs:
env:
EMSDK_VERSION: 3.1.40
run: |-
./emsdk install ${EMSDK_VERSION}
./emsdk activate ${EMSDK_VERSION}
./emsdk install "${EMSDK_VERSION}"
./emsdk activate "${EMSDK_VERSION}"
working-directory: emsdk

- name: Check out main repository
Expand All @@ -53,7 +53,7 @@ jobs:
working-directory: tromino-puzzle/emscripten

- name: Archive files
run: tar --create --file=dist.tar *
run: tar --create --file=dist.tar -- *
working-directory: tromino-puzzle/dist/web

- name: Archive web app artifacts
Expand All @@ -76,7 +76,7 @@ jobs:
ref: gh-pages

- name: Remove current files
run: rm -rf *
run: rm -rf -- *

- name: Download build artifact
uses: actions/download-artifact@v3
Expand Down
24 changes: 20 additions & 4 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,9 @@ on:
pull_request:
branches:
- main
paths:
- "**.md"
push:
branches:
- main
paths:
- "**.md"
workflow_dispatch:

permissions:
Expand All @@ -30,3 +26,23 @@ jobs:

- name: Run markdownlint
run: markdownlint .

superlinter:
name: Super-Linter
runs-on: ubuntu-latest

steps:
- name: Check out code
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Run Super-Linter
uses: github/super-linter/slim@v4
env:
DEFAULT_BRANCH: main
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
HTML_FILE_NAME: ${{ github.workspace }}/.htmlhintrc
VALIDATE_ALL_CODEBASE: true
VALIDATE_JAVASCRIPT_STANDARD: false
VALIDATE_JSCPD: false
22 changes: 11 additions & 11 deletions .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,18 +63,18 @@ jobs:
env:
SONAR_SCANNER_DOWNLOAD_URL: https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-${{ env.SONAR_SCANNER_VERSION }}-linux.zip
run: >-
mkdir --parents $HOME/.sonar
mkdir --parents "$HOME/.sonar"
curl
--silent
--show-error
--location
--output $HOME/.sonar/sonar-scanner.zip
${{ env.SONAR_SCANNER_DOWNLOAD_URL }}
--output "$HOME/.sonar/sonar-scanner.zip"
"${{ env.SONAR_SCANNER_DOWNLOAD_URL }}"
unzip
-o $HOME/.sonar/sonar-scanner.zip
-d $HOME/.sonar/
-o "$HOME/.sonar/sonar-scanner.zip"
-d "$HOME/.sonar/"
echo "$HOME/.sonar/sonar-scanner-${{ env.SONAR_SCANNER_VERSION }}-linux/bin"
>> $GITHUB_PATH
Expand All @@ -87,12 +87,12 @@ jobs:
--silent
--show-error
--location
--output $HOME/.sonar/build-wrapper-linux-x86.zip
${{ env.BUILD_WRAPPER_DOWNLOAD_URL }}
--output "$HOME/.sonar/build-wrapper-linux-x86.zip"
"${{ env.BUILD_WRAPPER_DOWNLOAD_URL }}"
unzip
-o $HOME/.sonar/build-wrapper-linux-x86.zip
-d $HOME/.sonar/
-o "$HOME/.sonar/build-wrapper-linux-x86.zip"
-d "$HOME/.sonar/"
echo "$HOME/.sonar/build-wrapper-linux-x86"
>> $GITHUB_PATH
Expand All @@ -104,7 +104,7 @@ jobs:
./configure --enable-code-coverage CPPFLAGS=-DTROMINO_2D_HEADLESS
build-wrapper-linux-x86-64
--out-dir ${{ env.BUILD_WRAPPER_OUT_DIR }}
--out-dir "${{ env.BUILD_WRAPPER_OUT_DIR }}"
make clean all check
- name: Run tromino
Expand Down Expand Up @@ -137,7 +137,7 @@ jobs:
--exclude=/usr/include
--keep
--root .
--sonarqube ${{ env.COVERAGE_REPORTS_PATH }}
--sonarqube "${{ env.COVERAGE_REPORTS_PATH }}"
- name: Run sonar-scanner
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/windows-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,4 @@ jobs:
-property:Platform=${{ env.BUILD_PLATFORM }}
-validate
-warnAsError
${{ env.SOLUTION_FILE_PATH }}
"${{ env.SOLUTION_FILE_PATH }}"
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
[![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)
[![CodeFactor](https://www.codefactor.io/repository/github/oboukli/tromino-puzzle/badge)](https://www.codefactor.io/repository/github/oboukli/tromino-puzzle)
[![Codacy](https://app.codacy.com/project/badge/Grade/8395b4fbd3b34c72907b0e65fe0b5f35)](https://www.codacy.com/gh/oboukli/tromino-puzzle/dashboard)
[![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 C library (see `src/libtromino`) implementing a divide-and-conquer O(n)
algorithm, and a collection of apps, to solve the tromino puzzle,
Expand Down

0 comments on commit b44b2c6

Please sign in to comment.