-
-
Notifications
You must be signed in to change notification settings - Fork 102
62 lines (51 loc) · 1.58 KB
/
ci.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
62
name: CI
on:
push:
pull_request:
schedule:
- cron: "0 6 * * 1" # Every monday 6 AM
jobs:
test:
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04, macos-13, macos-14]
crystal: [latest, nightly]
include:
- os: windows-2022
crystal: nightly
- os: ubuntu-22.04
crystal: 1.0.0
runs-on: ${{ matrix.os }}
steps:
- name: Configure Git
run: |
git config --global user.email "[email protected]"
git config --global user.name "Your Name"
git config --global column.ui always
git config --global core.autocrlf false
- name: Install Crystal
uses: oprypin/install-crystal@v1
with:
crystal: ${{ matrix.crystal }}
- name: Install Fossil and Mercurial
if: ${{ runner.os == 'Linux' }}
run: |
sudo apt-get update
sudo apt-get install fossil mercurial
- name: Install Fossil and Mercurial
if: ${{ runner.os == 'macOS' }}
run: |
brew update
brew install fossil mercurial
- name: Install Fossil and Mercurial
if: ${{ runner.os == 'Windows' }}
run: choco install fossil hg
- name: Download source
uses: actions/checkout@v4
- name: Build
run: make -f ${{ runner.os == 'Windows' && 'Makefile.win' || 'Makefile' }}
- name: Run specs
run: make -f ${{ runner.os == 'Windows' && 'Makefile.win' || 'Makefile' }} test
- name: Check formatting
run: crystal tool format --check src spec