Skip to content

Added Github action to run tests on active PR #17

Added Github action to run tests on active PR

Added Github action to run tests on active PR #17

Workflow file for this run

name: run-tests
on:
pull_request: # Should trigger on pull requests for all branches
branches:
- '**' # Matches all branches
jobs:
x86-test:
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: Run x86 tests
run: |
chmod +x run-tests.sh
./run-tests.sh -Di386 test || exit 1
./run-tests.sh -Di386 clean || true
shell-test:
runs-on: ubuntu-latest
strategy:
matrix:
shells: [bash, ksh, dash, zsh]
steps:
- name: Checkout code
uses: actions/checkout@v2
with: # Checkout code from the branch that triggered the workflow
ref: ${{ github.ref }}
shell: ${{ matrix.shells }}
- name: Install required shell
run: |
sudo apt-get update
if [ "${{ matrix.shells }}" == "ksh" ]; then sudo apt-get install -y ksh; fi
if [ "${{ matrix.shells }}" == "zsh" ]; then sudo apt-get install -y zsh; fi
if [ "${{ matrix.shells }}" == "dash" ]; then sudo apt-get install -y dash; fi
- name: Run shell tests
run: |
chmod +x run-tests.sh
./run-tests.sh -Dsh test || exit 1
./run-tests.sh -Dsh clean || true
bootstraps:
runs-on: ubuntu-latest
strategy:
matrix:
shells: [bash, ksh, dash, zsh]
steps:
- name: Checkout code
uses: actions/checkout@v2
with: # Checkout code from the branch that triggered the workflow
ref: ${{ github.ref }}
shell: ${{ matrix.shells }}
- name: Install required shell
run: |
sudo apt-get update
if [ "${{ matrix.shells }}" == "ksh" ]; then sudo apt-get install -y ksh; fi
if [ "${{ matrix.shells }}" == "zsh" ]; then sudo apt-get install -y zsh; fi
if [ "${{ matrix.shells }}" == "dash" ]; then sudo apt-get install -y dash; fi
- name: Run bootstrap shell
id: bootstrap-shell
run: |
set -e
./bootstrap-pnut.sh || exit 1
- name: Run bootstrap x86
id: bootstrap-x86
run: |
set -e
./bootstrap-pnut-x86.sh || exit 1
# benchmarks:
# runs-on: ubuntu-latest
# strategy:
# matrix:
# shells: [bash, ksh, dash, zsh, ash, yash]
# steps:
# - name: Checkout code
# uses: actions/checkout@v2
# with: # Checkout code from the branch that triggered the workflow
# ref: ${{ github.ref }}
# shell: ${{ matrix.shells }}
# - name: Run benchmarks
# run: |
# chmod +x benchmark.sh
# ./benchmark.sh ${{ matrix.shells }}
# - name: Upload benchmark results
# uses: actions/upload-artifact@v2
# with:
# name: benchmark-results-${{ matrix.shells }} # Name of the artifact
# path: benchmark_results_${{ matrix.shells }}.tex # Upload the benchmark results
success-message: # This job will run after the test jobs have completed successfully
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 "=( _____| (_________| "