Skip to content

🤖 Sync org-wide files to upstream repo #65

🤖 Sync org-wide files to upstream repo

🤖 Sync org-wide files to upstream repo #65

Workflow file for this run

name: Tests
on:
pull_request:
push:
branches:
- master
jobs:
track-config:
name: Check track configuration
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
- name: Fetch
run: bin/fetch-configlet
- name: Lint
run: bin/configlet lint .
- name: Check for invalid UUIDs
# can be removed once `configlet lint` gains this ability.
# Check issue https://github.com/exercism/configlet/issues/99
run: |
uuids=$(jq --raw-output '.exercises | map(.uuid) | .[]' config.json)
bad_uuid=$(echo "$uuids" | grep -vE '^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$' || true)
if [ -n "$bad_uuid" ]; then
echo "invalid UUIDs found! please correct these to be valid UUIDs:"
echo "$bad_uuid"
exit 1
fi
exercises:
name: Check exercises
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
# It appears that the Ceylon tests work without having to do setup-java.
# If in the future it breaks, try explicitly adding actions/setup-java@v1.
# As of Ceylon 1.3.3, I couldn't get Ceylon to work with Java 9, 10, or 11,
# so it may have to be Java 8 only.
- name: Install SDKMan
run: curl -s https://get.sdkman.io | bash
- name: Install Ceylon
run: |
source $HOME/.sdkman/bin/sdkman-init.sh
sdk install ceylon 1.3.3
- name: Find Ceylon (diagnostic)
run: find $HOME/.sdkman -type f -name ceylon
- name: Add Ceylon to PATH
run: echo "$HOME/.sdkman/candidates/ceylon/1.3.3/bin" >> $GITHUB_PATH
- name: Compile stubs
run: bin/compile-all-stubs
- name: Run tests
run: bin/test-all-exercises
- name: Check formatting
run: |
if ! ceylon format exercises; then
echo "'ceylon format' couldn't run!"
exit 1
fi
if ! git diff --exit-code; then
echo "'ceylon format' found differences! Please match 'ceylon format' so this repo can have consistent style!"
exit 1
fi