-
-
Notifications
You must be signed in to change notification settings - Fork 10
61 lines (60 loc) · 2.19 KB
/
tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
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