-
Notifications
You must be signed in to change notification settings - Fork 21
37 lines (37 loc) · 977 Bytes
/
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
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
crystal: [latest]
runs-on: ${{ matrix.os }}
steps:
- name: Download source
uses: actions/checkout@v4
- name: Install Crystal
uses: crystal-lang/install-crystal@v1
with:
crystal: ${{ matrix.crystal }}
- name: Install libraries
run: |
if [ "$RUNNER_OS" == "macOS" ]; then
brew install libxml2
fi
shell: bash
- name: Install shards
run: shards install
- name: Run tests
run: |
if [ "$RUNNER_OS" == "macOS" ]; then
LOG_LEVEL=NONE PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/libxml2/lib/pkgconfig" crystal spec
else
LOG_LEVEL=NONE crystal spec
fi
- name: Build
run: shards build