-
-
Notifications
You must be signed in to change notification settings - Fork 153
67 lines (52 loc) · 1.64 KB
/
ci-base.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
63
64
65
66
67
name: CI
on:
workflow_call:
inputs:
crystal-version:
required: true
type: string
jobs:
test:
name: Test
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-13]
runs-on: ${{ matrix.os }}
timeout-minutes: 15
steps:
- name: Install Crystal
uses: crystal-lang/install-crystal@v1
with:
crystal: ${{ inputs.crystal-version }}
- if: matrix.os == 'ubuntu-latest'
name: Install `xmllint` (Linux)
run: |
sudo apt-get update
sudo apt-get install libxml2-utils -y
- name: Download source
uses: actions/checkout@v4
- name: Install dependencies
run: shards install
- name: Run specs
run: crystal spec --error-on-warnings --error-trace
- name: Build the binary
run: shards build --error-on-warnings --error-trace
- name: Run CLI specs
run: crystal spec spec_cli/*_spec.cr spec_cli/**/*_spec.cr --error-on-warnings --error-trace
- name: Run core specs (Firefox)
working-directory: ./core/tests
run: ../../bin/mint test -b firefox
# - name: Run core specs (Google Chrome)
# working-directory: ./core/tests
# run: ../../bin/mint test -b chrome
- name: Check formatting (Mint)
working-directory: ./core
run: ../bin/mint format --check
- name: Check formatting (Mint tests)
working-directory: ./core/tests
run: ../../bin/mint format --check
- name: Check formatting (Crystal)
run: crystal tool format --check
- name: Run ameba
run: bin/ameba