Skip to content

Added Github action to run tests on active PR #25

Added Github action to run tests on active PR

Added Github action to run tests on active PR #25

Workflow file for this run

name: run-tests
on:
pull_request: # Should trigger on pull requests for all branches
branches:
- '**' # Matches all branches
jobs:
setup:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install required shells
run: |
sudo apt-get update
sudo apt-get install -y ksh zsh dash mksh yash busybox-static
x86-test:
runs-on: ubuntu-latest
needs: setup
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Run x86 tests
run: |
set -e
chmod +x run-tests.sh
./run-tests.sh -Di386 test || exit 1
./run-tests.sh -Di386 clean || true
shell-test:
runs-on: ubuntu-latest
needs: setup
strategy:
matrix:
shell: [bash, ksh, dash, zsh, ash, yash, mksh]
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Run shell tests with ${{ matrix.shell }}
shell: ${{ matrix.shell }}

Check failure on line 46 in .github/workflows/main.yml

View workflow run for this annotation

GitHub Actions / run-tests

Invalid workflow file

The workflow is not valid. .github/workflows/main.yml (Line: 46, Col: 16): Unrecognized named-value: 'matrix'. Located at position 1 within expression: matrix.shell
run: |
set -e
chmod +x run-tests.sh
./run-tests.sh -Dsh test || exit 1
./run-tests.sh -Dsh clean || true
bootstraps:
runs-on: ubuntu-latest
needs: setup
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Run bootstrap shell with all shells
run: |
set -e
chmod +x bootstrap-pnut.sh
./bootstrap-pnut.sh TEST_ALL_SHELLS || exit 1
- name: Run bootstrap x86
run: |
set -e
chmod +x bootstrap-pnut-x86.sh
./bootstrap-pnut-x86.sh || exit 1
success-message:
runs-on: ubuntu-latest
needs: [x86-test, shell-test, bootstraps]
steps:
- name: Tests finished
run: |
echo " ,-~~-.___."
echo " / | ' \\ Pnut tests completed...."
echo "( ) 0"
echo " \\_/-, ,----'"
echo " ==== //"
echo " / \\-'~; /~~~(O)"
echo " / __/~| / |"
echo "=( _____| (_________| "