Skip to content

Add Whitespace implementation #73

Add Whitespace implementation

Add Whitespace implementation #73

Workflow file for this run

name: CI
on:
- push
- pull_request
jobs:
detect_languages:
name: Select tests
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Find all languages
run: |
ls -d */ | egrep -v '^_' | tr -d / | sort > all_langs
cp all_langs langs_to_test
- name: Find changed languages
if: github.event_name == 'pull_request' || github.ref != 'refs/heads/master'
run: |
before_ref=${{ github.event.pull_request.base.sha || 'origin/master' }}
git diff --name-only $before_ref ${{ github.sha }} > changed_files
if ! egrep -q '^(_test/.*|test|docker_test)$' changed_files; then
git diff --name-only $before_ref ${{ github.sha }} |
cut -f1 -d'/' |
sort |
uniq |
comm -12 - all_langs > langs_to_test
fi
- name: Set job output
id: set-job-output
run: |
jq -R -s -c 'split("\n") | map(select(length > 0))' < langs_to_test > langs_to_test.json
echo "Languages to test: $(cat langs_to_test.json)"
echo "::set-output name=languages::$(cat langs_to_test.json)"
outputs:
languages: ${{ steps.set-job-output.outputs.languages }}
test:
name: Test
runs-on: ubuntu-latest
needs: detect_languages
if: ${{ needs.detect_languages.outputs.languages != '[]' }}
strategy:
fail-fast: false
matrix:
lang: ${{ fromJson(needs.detect_languages.outputs.languages) }}
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Run tests
run: ./docker_test '${{ matrix.lang }}'
timeout-minutes: 10