Skip to content

Commit 0d8be2c

Browse files
Fix CI and docs workflow blockers
1 parent fd7e79f commit 0d8be2c

3 files changed

Lines changed: 33 additions & 49 deletions

File tree

.github/workflows/build.yml

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,12 @@ jobs:
2323

2424
steps:
2525
- name: Checkout code
26-
uses: actions/checkout@v4
27-
28-
- name: Install Crystal (Ubuntu)
29-
if: matrix.os == 'ubuntu-latest'
30-
run: |
31-
curl -fsSL https://crystal-lang.org/install.sh | sudo bash
32-
33-
- name: Install Crystal (macOS)
34-
if: matrix.os == 'macos-latest'
35-
run: |
36-
brew update
37-
brew install crystal
26+
uses: actions/checkout@v6
27+
28+
- name: Install Crystal
29+
uses: crystal-lang/install-crystal@v1
30+
with:
31+
crystal: latest
3832

3933
- name: Cache shards
4034
uses: actions/cache@v4
@@ -49,6 +43,11 @@ jobs:
4943
- name: Install dependencies
5044
run: shards install
5145

46+
- name: Build LSP binary for integration specs
47+
run: |
48+
mkdir -p bin
49+
crystal build src/amber_lsp.cr --no-debug -o bin/amber-lsp
50+
5251
- name: Run tests
5352
run: crystal spec
5453

@@ -71,11 +70,11 @@ jobs:
7170
./amber-lsp --help
7271
7372
- name: Upload build artifacts
74-
uses: actions/upload-artifact@v4
73+
uses: actions/upload-artifact@v7
7574
if: github.event_name == 'workflow_dispatch'
7675
with:
7776
name: amber-cli-${{ matrix.target }}-build
7877
path: |
7978
amber
8079
amber-lsp
81-
retention-days: 7
80+
retention-days: 7

.github/workflows/ci.yml

Lines changed: 20 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -14,32 +14,17 @@ jobs:
1414
matrix:
1515
os: [ubuntu-latest, macos-latest]
1616
crystal: [latest]
17-
include:
18-
- os: ubuntu-latest
19-
crystal-install: |
20-
curl -fsSL https://crystal-lang.org/install.sh | sudo bash
21-
- os: macos-latest
22-
crystal-install: |
23-
brew install crystal
2417

2518
name: Test on ${{ matrix.os }} with Crystal ${{ matrix.crystal }}
2619

2720
steps:
2821
- name: Checkout code
29-
uses: actions/checkout@v4
30-
31-
- name: Install Crystal (Ubuntu)
32-
if: matrix.os == 'ubuntu-latest'
33-
run: |
34-
curl -fsSL https://crystal-lang.org/install.sh | sudo bash
35-
crystal version
36-
37-
- name: Install Crystal (macOS)
38-
if: matrix.os == 'macos-latest'
39-
run: |
40-
brew install crystal
41-
crystal version
22+
uses: actions/checkout@v6
4223

24+
- name: Install Crystal
25+
uses: crystal-lang/install-crystal@v1
26+
with:
27+
crystal: latest
4328

4429

4530
- name: Cache shards
@@ -69,6 +54,11 @@ jobs:
6954
- name: Compile LSP
7055
run: crystal build src/amber_lsp.cr --no-debug -o amber-lsp
7156

57+
- name: Build LSP binary for integration specs
58+
run: |
59+
mkdir -p bin
60+
crystal build src/amber_lsp.cr --no-debug -o bin/amber-lsp
61+
7262
- name: Run tests
7363
run: crystal spec
7464

@@ -99,17 +89,12 @@ jobs:
9989

10090
steps:
10191
- name: Checkout code
102-
uses: actions/checkout@v4
92+
uses: actions/checkout@v6
10393

104-
- name: Install Crystal (Ubuntu)
105-
if: matrix.os == 'ubuntu-latest'
106-
run: |
107-
curl -fsSL https://crystal-lang.org/install.sh | sudo bash
108-
109-
- name: Install Crystal (macOS)
110-
if: matrix.os == 'macos-latest'
111-
run: |
112-
brew install crystal
94+
- name: Install Crystal
95+
uses: crystal-lang/install-crystal@v1
96+
with:
97+
crystal: latest
11398

11499
- name: Install dependencies
115100
run: shards install
@@ -133,11 +118,12 @@ jobs:
133118

134119
steps:
135120
- name: Checkout code
136-
uses: actions/checkout@v4
121+
uses: actions/checkout@v6
137122

138123
- name: Install Crystal
139-
run: |
140-
curl -fsSL https://crystal-lang.org/install.sh | sudo bash
124+
uses: crystal-lang/install-crystal@v1
125+
with:
126+
crystal: latest
141127

142128
- name: Install dependencies
143129
run: shards install
@@ -148,4 +134,4 @@ jobs:
148134
crystal spec spec/integration/
149135
else
150136
echo "No integration tests found, skipping..."
151-
fi
137+
fi

src/amber_cli/commands.cr

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ require "./config"
44

55
module Amber::CLI
66
include Amber::Environment
7-
AMBER_YML = ".amber.yml"
87

98
def self.toggle_colors(on_off)
109
Colorize.enabled = !on_off

0 commit comments

Comments
 (0)