Added Github action to run tests on active PR #24
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
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 | ||
with: # Checkout code from the branch that triggered the workflow | ||
ref: ${{ github.ref }} | ||
- 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 | ||
with: # Checkout code from the branch that triggered the workflow | ||
ref: ${{ github.ref }} | ||
- 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 | ||
with: # Checkout code from the branch that triggered the workflow | ||
ref: ${{ github.ref }} | ||
- name: Run shell tests | ||
shell: ${{ matrix.shells }} | ||
Check failure on line 52 in .github/workflows/main.yml GitHub Actions / run-testsInvalid workflow file
|
||
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 | ||
with: # Checkout code from the branch that triggered the workflow | ||
ref: ${{ github.ref }} | ||
- 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 "=( _____| (_________| " |