binaries using facade: #155
Workflow file for this run
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
--- | |
# Lint the code base and launch unit test at each push or pull request | |
name: Lint and test | |
on: | |
push: | |
workflow_dispatch: | |
jobs: | |
linters: | |
runs-on: ubuntu-22.04 | |
strategy: | |
fail-fast: true | |
matrix: | |
vendor: | |
- ubuntu | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
- uses: ouzi-dev/commit-status-updater@v2 | |
with: | |
name: lint | |
status: pending | |
- name: Install vendors | |
run: | | |
set -exo pipefail | |
./bin/installRequirements | |
- name: Linting - Shellcheck | |
run: | | |
set -exo pipefail | |
./bin/shellcheckLint -f checkstyle | tee logs/shellcheck-checkstyle.xml | |
- name: Linting - Framework | |
run: | | |
set -exo pipefail | |
./bin/frameworkLint -f checkstyle | tee logs/framework-checkstyle.xml | |
- name: Linting - Awk | |
run: | | |
set -exo pipefail | |
./bin/awkLint | tee logs/awk-checkstyle.xml | |
- name: build bin files + check md5 | |
run: | | |
set -exo pipefail | |
./bin/buildBinFiles 2>&1 | tee logs/buidBinFiles.log | |
- name: Checkstyle aggregation | |
uses: jwgmeligmeyling/checkstyle-github-action@master | |
with: | |
path: 'logs/*-checkstyle.xml' | |
- name: Archive results | |
uses: actions/upload-artifact@v3 | |
with: | |
name: linter-reports | |
path: | | |
logs/*.xml | |
logs/*.log | |
- uses: ouzi-dev/commit-status-updater@v2 | |
if: always() | |
with: | |
name: lint | |
status: ${{ job.status }} | |
tests: | |
needs: linters | |
runs-on: ubuntu-22.04 | |
strategy: | |
fail-fast: true | |
matrix: | |
vendor: | |
- ubuntu | |
- alpine | |
bashTarVersion: | |
- '4.4' | |
- '5.0' | |
- '5.1' | |
include: | |
- vendor: ubuntu | |
bashImage: ubuntu:20.04 | |
options: -j 1 | |
- vendor: alpine | |
bashImage: bash | |
options: -j 1 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to DockerHub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- uses: ouzi-dev/commit-status-updater@v2 | |
with: | |
name: build bash-tools-${{matrix.vendor}}-${{matrix.bashTarVersion}} | |
status: pending | |
- name: run unit tests | |
run: | | |
set -exo pipefail | |
./bin/installRequirements | |
# shellcheck disable=SC2266 | |
VENDOR="${{ matrix.vendor }}" \ | |
BASH_TAR_VERSION="${{ matrix.bashTarVersion }}" \ | |
BASH_IMAGE="${{ matrix.bashImage }}" \ | |
SKIP_BUILD=0 \ | |
SKIP_USER=1 \ | |
./bin/test ${{matrix.options}} --report-formatter junit -o logs -r src | |
- name: Publish Unit Test Results | |
uses: EnricoMi/publish-unit-test-result-action@v1 | |
if: always() | |
with: | |
files: logs/report.xml | |
check_name: | |
'Unit Test Results ${{matrix.vendor}} ${{matrix.bashTarVersion}}' | |
- uses: ouzi-dev/commit-status-updater@v2 | |
if: always() | |
with: | |
name: build bash-tools-${{matrix.vendor}}-${{matrix.bashTarVersion}} | |
status: ${{ job.status }} | |
buildResults: | |
if: ${{ always() }} | |
runs-on: ubuntu-latest | |
name: Final Build Results | |
needs: [linters, tests] | |
steps: | |
# run this action to get the workflow conclusion | |
# You can get the conclusion via env (env.WORKFLOW_CONCLUSION) | |
- uses: technote-space/workflow-conclusion-action@v3 | |
# run other action with the workflow conclusion | |
- uses: ouzi-dev/commit-status-updater@v2 | |
with: | |
name: build | |
# neutral, success, skipped, cancelled, timed_out, action_required, failure | |
status: ${{ env.WORKFLOW_CONCLUSION }} |