Skip to content

Merge pull request #215 from oreinert/fix/editorconfig #93

Merge pull request #215 from oreinert/fix/editorconfig

Merge pull request #215 from oreinert/fix/editorconfig #93

Workflow file for this run

name: Lint & test
on:
push:
branches: [ '*' ]
pull_request:
branches: [ '*' ]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Install shellcheck
run: |
wget -O- https://github.com/koalaman/shellcheck/releases/download/v0.7.1/shellcheck-v0.7.1.linux.x86_64.tar.xz | \
sudo tar -xJC /usr/local/bin --strip-components 1 shellcheck-v0.7.1/shellcheck
- name: Checkout the project
uses: actions/checkout@v3
- name: Lint with shellcheck
run: |
echo "::add-matcher::.github/shellcheck.json"
test/shellcheck
echo "::remove-matcher owner=shellcheck::"
test:
strategy:
matrix:
bash-version: ['3.2.57', '4.0', '4.1', '4.2', '4.3', '4.3.30', '4.4', '5.0', '5.1', '5.1.12', '5.1.16', '5.2', '5.2.9']
runs-on: ubuntu-latest
steps:
- name: Install testing dependencies
run: |
sudo apt-add-repository ppa:fish-shell/release-3 --yes
sudo apt-get -qq update
sudo apt-get -qq install fish expect tcsh
git clone --depth 1 --branch v1.2.1 https://github.com/bats-core/bats-core.git /tmp/bats
sudo /tmp/bats/install.sh /usr/local
rm -rf /tmp/bats
- name: Checkout the project
uses: actions/checkout@v3
- name: Cache bash versions
uses: actions/cache@v3
env:
cache-name: bash-version
with:
path: test/bash-versions/bash-${{ matrix.bash-version }}/bash
key: ${{ env.cache-name }}-${{ matrix.bash-version }}
- name: Download & compile bash ${{ matrix.bash-version }}
run: |
test/get_bash.sh "${{ matrix.bash-version }}"
echo "$PWD/test/bash-versions/bash-${{ matrix.bash-version }}" >> "$GITHUB_PATH"
- name: Download bats libraries
run: test/get_bats_libs.sh
- name: Test
run: |
echo "::add-matcher::.github/bats.json"
/usr/local/bin/bats --tap "$PWD/test/suites"
echo "::remove-matcher owner=bats::"