🤖 Sync org-wide files to upstream repo #76
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: Tests | |
on: | |
pull_request: | |
push: | |
branches: | |
- master | |
jobs: | |
track-config: | |
name: Check track configuration | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 | |
- 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@692973e3d937129bcbf40652eb9f2f61becf3332 | |
# 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 |