forked from exercism/odin
-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (40 loc) · 1.45 KB
/
test.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
# This workflow will do a clean install of the dependencies and run tests across different versions.
# It will also apply automatic code formatting.
#
# Find Github Actions to setup tooling here:
# - https://github.com/actions/?q=setup&type=&language=
# - https://github.com/actions/starter-workflows/tree/main/ci
# - https://github.com/marketplace?type=actions&query=setup
#
# Requires scripts:
# - bin/test
name: odin / Test
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
jobs:
ci:
runs-on: ubuntu-20.04
steps:
- name: Checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
- name: Setup Odin
uses: laytan/setup-odin@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
# TODO: Pull a specific version of Odin compatible with the OS.
# The current setting pulls the latest version of Odin from the repo, and rebuilds it from
# scratch. This is slow, and clutters the action's log. Rather ensure that the OS has the
# right dependencies for a recent versioned release of the compiler.
release: false
llvm-version: 14
- name: Install project dependencies
run: bin/fetch-configlet
- name: Run the project linter
run: bin/configlet lint
- name: Verify all exercises
run: bin/run-test.sh
- name: Apply code formatting to all .odin files
run: bin/format-all.sh