Skip to content

Added Github action to run tests on active PR #28

Added Github action to run tests on active PR

Added Github action to run tests on active PR #28

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:
# shells: [bash, ksh, dash, zsh, ash, yash, mksh]
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Run shell tests with bash
shell: bash
run: |
echo "Running tests with $0"
set -e
chmod +x run-tests.sh
./run-tests.sh -Dsh test || exit 1
./run-tests.sh -Dsh clean || true
- name: Run shell tests with ksh
shell: ksh
run: |
echo "Running tests with $0"
set -e
chmod +x run-tests.sh
./run-tests.sh -Dsh test || exit 1
./run-tests.sh -Dsh clean || true
- name: Run shell tests with dash
shell: dash
run: |
echo "Running tests with $0"
set -e
chmod +x run-tests.sh
./run-tests.sh -Dsh test || exit 1
./run-tests.sh -Dsh clean || true
- name: Run shell tests with zsh
shell: zsh
run: |
echo "Running tests with $0"
set -e
chmod +x run-tests.sh
./run-tests.sh -Dsh test || exit 1
./run-tests.sh -Dsh clean || true
- name: Run shell tests with yash
shell: yash
run: |
echo "Running tests with $0"
set -e
chmod +x run-tests.sh
./run-tests.sh -Dsh test || exit 1
./run-tests.sh -Dsh clean || true
- name: Run shell tests with ash
shell: ash
run: |
echo "Running tests with $0"
set -e
chmod +x run-tests.sh
./run-tests.sh -Dsh test || exit 1
./run-tests.sh -Dsh clean || true
- name: Run shell tests with mksh
shell: mksh
run: |
echo "Running tests with $0"
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 "=( _____| (_________| "