Skip to content

Commit dedaae3

Browse files
committed
Attempting to clean up the CI a little with better cross-platform compatibility
1 parent 5234574 commit dedaae3

1 file changed

Lines changed: 131 additions & 125 deletions

File tree

.github/workflows/ci.yml

Lines changed: 131 additions & 125 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
fail-fast: false
5555
matrix:
5656
include:
57-
- { os: macos-latest }
57+
# - { os: macos-latest }
5858
- { os: windows-latest }
5959
- { os: ubuntu-latest }
6060
runs-on: ${{matrix.os}}
@@ -77,133 +77,139 @@ jobs:
7777
- name: Install shards
7878
run: shards install --skip-postinstall --skip-executables
7979
- name: Install LuckyCLI
80-
run: |
81-
crystal build src/lucky.cr
82-
pwd >> $GITHUB_PATH
80+
run: crystal build src/lucky.cr
81+
- name: Add current directory to PATH
82+
shell: bash
83+
run: echo "$PWD" >> "$GITHUB_PATH"
8384

8485
# NOTE: Using `env: SHARDS_OVERRIDE` here doesn't seem to work. It will throw a missing file error on every OS
86+
# - name: Run e2e Browser app with authentication flow
87+
# if: matrix.os == 'windows-latest'
88+
# run: |
89+
# $env:SHARDS_OVERRIDE = Join-Path -Path $pwd.Path -ChildPath "shard.override.yml"
90+
# crystal spec spec/end_to_end/browser_with_auth_spec.cr
91+
- name: Set SHARDS_OVERRIDE
92+
shell: bash
93+
run: echo "SHARDS_OVERRIDE=${GITHUB_WORKSPACE}/shard.override.yml" >> "$GITHUB_ENV"
8594
- name: Run e2e Browser app with authentication flow
86-
if: matrix.os == 'windows-latest'
87-
run: |
88-
$env:SHARDS_OVERRIDE = Join-Path -Path $pwd.Path -ChildPath "shard.override.yml"
89-
crystal spec spec/end_to_end/browser_with_auth_spec.cr
90-
- name: Run e2e Browser app with authentication flow
91-
if: matrix.os != 'windows-latest'
92-
run: SHARDS_OVERRIDE="$(pwd)/shard.override.yml" crystal spec spec/end_to_end/browser_with_auth_spec.cr
95+
run: crystal spec spec/end_to_end/browser_with_auth_spec.cr
9396

94-
browser_without_auth:
95-
needs: [check_format, platform_specs]
96-
strategy:
97-
fail-fast: false
98-
matrix:
99-
include:
100-
- { os: macos-latest }
101-
- { os: windows-latest }
102-
- { os: ubuntu-latest }
103-
runs-on: ${{matrix.os}}
104-
continue-on-error: false
105-
steps:
106-
- uses: actions/checkout@v6
107-
- name: Setup PostgreSQL
108-
uses: ikalnytskyi/action-setup-postgres@v8
109-
with:
110-
username: postgres
111-
password: postgres
112-
port: 5432
113-
postgres-version: 18
114-
- uses: actions/setup-node@v6
115-
with:
116-
node-version: 24
117-
- uses: crystal-lang/install-crystal@v1
118-
with:
119-
crystal: latest
120-
- name: Install shards
121-
run: shards install --skip-postinstall --skip-executables
122-
- name: Install LuckyCLI
123-
run: |
124-
crystal build src/lucky.cr
125-
pwd >> $GITHUB_PATH
126-
- name: Run e2e Browser app without authentication flow
127-
if: matrix.os == 'windows-latest'
128-
run: |
129-
$env:SHARDS_OVERRIDE = Join-Path -Path $pwd.Path -ChildPath "shard.override.yml"
130-
crystal spec spec/end_to_end/browser_no_auth_spec.cr
131-
- name: Run e2e Browser app without authentication flow
132-
if: matrix.os != 'windows-latest'
133-
run: SHARDS_OVERRIDE="$(pwd)/shard.override.yml" crystal spec spec/end_to_end/browser_no_auth_spec.cr
97+
# browser_without_auth:
98+
# needs: [check_format, platform_specs]
99+
# strategy:
100+
# fail-fast: false
101+
# matrix:
102+
# include:
103+
# - { os: macos-latest }
104+
# - { os: windows-latest }
105+
# - { os: ubuntu-latest }
106+
# runs-on: ${{matrix.os}}
107+
# continue-on-error: false
108+
# steps:
109+
# - uses: actions/checkout@v6
110+
# - name: Setup PostgreSQL
111+
# uses: ikalnytskyi/action-setup-postgres@v8
112+
# with:
113+
# username: postgres
114+
# password: postgres
115+
# port: 5432
116+
# postgres-version: 18
117+
# - uses: actions/setup-node@v6
118+
# with:
119+
# node-version: 24
120+
# - uses: crystal-lang/install-crystal@v1
121+
# with:
122+
# crystal: latest
123+
# - name: Install shards
124+
# run: shards install --skip-postinstall --skip-executables
125+
# - name: Install LuckyCLI
126+
# run: crystal build src/lucky.cr
127+
# - name: Add current directory to PATH
128+
# shell: bash
129+
# run: echo "$PWD" >> "$GITHUB_PATH"
130+
# - name: Run e2e Browser app without authentication flow
131+
# if: matrix.os == 'windows-latest'
132+
# run: |
133+
# $env:SHARDS_OVERRIDE = Join-Path -Path $pwd.Path -ChildPath "shard.override.yml"
134+
# crystal spec spec/end_to_end/browser_no_auth_spec.cr
135+
# - name: Run e2e Browser app without authentication flow
136+
# if: matrix.os != 'windows-latest'
137+
# run: SHARDS_OVERRIDE="$(pwd)/shard.override.yml" crystal spec spec/end_to_end/browser_no_auth_spec.cr
134138

135-
api_with_auth:
136-
needs: [check_format, platform_specs]
137-
strategy:
138-
fail-fast: false
139-
matrix:
140-
include:
141-
- { os: macos-latest }
142-
- { os: windows-latest }
143-
- { os: ubuntu-latest }
144-
runs-on: ${{matrix.os}}
145-
continue-on-error: false
146-
steps:
147-
- uses: actions/checkout@v6
148-
- name: Setup PostgreSQL
149-
uses: ikalnytskyi/action-setup-postgres@v8
150-
with:
151-
username: postgres
152-
password: postgres
153-
port: 5432
154-
postgres-version: 18
155-
- uses: crystal-lang/install-crystal@v1
156-
with:
157-
crystal: latest
158-
- name: Install shards
159-
run: shards install --skip-postinstall --skip-executables
160-
- name: Install LuckyCLI
161-
run: |
162-
crystal build src/lucky.cr
163-
pwd >> $GITHUB_PATH
164-
- name: Run e2e API app with authentication flow
165-
if: matrix.os == 'windows-latest'
166-
run: |
167-
$env:SHARDS_OVERRIDE = Join-Path -Path $pwd.Path -ChildPath "shard.override.yml"
168-
crystal spec spec/end_to_end/api_with_auth_spec.cr
169-
- name: Run e2e API app with authentication flow
170-
if: matrix.os != 'windows-latest'
171-
run: SHARDS_OVERRIDE="$(pwd)/shard.override.yml" crystal spec spec/end_to_end/api_with_auth_spec.cr
139+
# api_with_auth:
140+
# needs: [check_format, platform_specs]
141+
# strategy:
142+
# fail-fast: false
143+
# matrix:
144+
# include:
145+
# - { os: macos-latest }
146+
# - { os: windows-latest }
147+
# - { os: ubuntu-latest }
148+
# runs-on: ${{matrix.os}}
149+
# continue-on-error: false
150+
# steps:
151+
# - uses: actions/checkout@v6
152+
# - name: Setup PostgreSQL
153+
# uses: ikalnytskyi/action-setup-postgres@v8
154+
# with:
155+
# username: postgres
156+
# password: postgres
157+
# port: 5432
158+
# postgres-version: 18
159+
# - uses: crystal-lang/install-crystal@v1
160+
# with:
161+
# crystal: latest
162+
# - name: Install shards
163+
# run: shards install --skip-postinstall --skip-executables
164+
# - name: Install LuckyCLI
165+
# run: crystal build src/lucky.cr
166+
# - name: Add current directory to PATH
167+
# shell: bash
168+
# run: echo "$PWD" >> "$GITHUB_PATH"
169+
# - name: Run e2e API app with authentication flow
170+
# if: matrix.os == 'windows-latest'
171+
# run: |
172+
# $env:SHARDS_OVERRIDE = Join-Path -Path $pwd.Path -ChildPath "shard.override.yml"
173+
# crystal spec spec/end_to_end/api_with_auth_spec.cr
174+
# - name: Run e2e API app with authentication flow
175+
# if: matrix.os != 'windows-latest'
176+
# run: SHARDS_OVERRIDE="$(pwd)/shard.override.yml" crystal spec spec/end_to_end/api_with_auth_spec.cr
172177

173-
api_without_auth:
174-
needs: [check_format, platform_specs]
175-
strategy:
176-
fail-fast: false
177-
matrix:
178-
include:
179-
- { os: macos-latest }
180-
- { os: windows-latest }
181-
- { os: ubuntu-latest }
182-
runs-on: ${{matrix.os}}
183-
continue-on-error: false
184-
steps:
185-
- uses: actions/checkout@v6
186-
- name: Setup PostgreSQL
187-
uses: ikalnytskyi/action-setup-postgres@v8
188-
with:
189-
username: postgres
190-
password: postgres
191-
port: 5432
192-
postgres-version: 18
193-
- uses: crystal-lang/install-crystal@v1
194-
with:
195-
crystal: latest
196-
- name: Install shards
197-
run: shards install --skip-postinstall --skip-executables
198-
- name: Install LuckyCLI
199-
run: |
200-
crystal build src/lucky.cr
201-
pwd >> $GITHUB_PATH
202-
- name: Run e2e API app without authentication flow
203-
if: matrix.os == 'windows-latest'
204-
run: |
205-
$env:SHARDS_OVERRIDE = Join-Path -Path $pwd.Path -ChildPath "shard.override.yml"
206-
crystal spec spec/end_to_end/api_no_auth_spec.cr
207-
- name: Run e2e API app without authentication flow
208-
if: matrix.os != 'windows-latest'
209-
run: SHARDS_OVERRIDE="$(pwd)/shard.override.yml" crystal spec spec/end_to_end/api_no_auth_spec.cr
178+
# api_without_auth:
179+
# needs: [check_format, platform_specs]
180+
# strategy:
181+
# fail-fast: false
182+
# matrix:
183+
# include:
184+
# - { os: macos-latest }
185+
# - { os: windows-latest }
186+
# - { os: ubuntu-latest }
187+
# runs-on: ${{matrix.os}}
188+
# continue-on-error: false
189+
# steps:
190+
# - uses: actions/checkout@v6
191+
# - name: Setup PostgreSQL
192+
# uses: ikalnytskyi/action-setup-postgres@v8
193+
# with:
194+
# username: postgres
195+
# password: postgres
196+
# port: 5432
197+
# postgres-version: 18
198+
# - uses: crystal-lang/install-crystal@v1
199+
# with:
200+
# crystal: latest
201+
# - name: Install shards
202+
# run: shards install --skip-postinstall --skip-executables
203+
# - name: Install LuckyCLI
204+
# run: crystal build src/lucky.cr
205+
# - name: Add current directory to PATH
206+
# shell: bash
207+
# run: echo "$PWD" >> "$GITHUB_PATH"
208+
# - name: Run e2e API app without authentication flow
209+
# if: matrix.os == 'windows-latest'
210+
# run: |
211+
# $env:SHARDS_OVERRIDE = Join-Path -Path $pwd.Path -ChildPath "shard.override.yml"
212+
# crystal spec spec/end_to_end/api_no_auth_spec.cr
213+
# - name: Run e2e API app without authentication flow
214+
# if: matrix.os != 'windows-latest'
215+
# run: SHARDS_OVERRIDE="$(pwd)/shard.override.yml" crystal spec spec/end_to_end/api_no_auth_spec.cr

0 commit comments

Comments
 (0)