Skip to content

Commit 0af9bfc

Browse files
authored
Merge pull request #65 from michalc/ci/download-minio-up-front
ci: use consistent patterns for downloading
2 parents b7eccb5 + c6b004b commit 0af9bfc

File tree

1 file changed

+30
-11
lines changed

1 file changed

+30
-11
lines changed

.github/workflows/test.yml

Lines changed: 30 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,22 @@ jobs:
2828
name: reporter
2929
path: ./reporter/*
3030

31+
download-minio:
32+
runs-on: ubuntu-latest
33+
steps:
34+
- name: "Download MinIO"
35+
run: |
36+
mkdir -p ./minio
37+
curl -sS -L \
38+
https://dl.min.io/server/minio/release/linux-amd64/archive/minio.RELEASE.2023-07-21T21-12-44Z -o ./minio/minio-linux \
39+
https://dl.min.io/server/minio/release/darwin-amd64/archive/minio.RELEASE.2023-07-21T21-12-44Z -o ./minio/minio-darwin \
40+
https://dl.min.io/server/minio/release/windows-amd64/archive/minio.RELEASE.2023-07-21T21-12-44Z -o ./minio/minio-windows.exe
41+
- name: "Save MinIO"
42+
uses: actions/upload-artifact@v3
43+
with:
44+
name: minio
45+
path: ./minio/*
46+
3147
# We want older SQLite amalgamation files, but they are not available to download,
3248
# so must be built from source. And they cannot be build on Windows, even for tests
3349
# that then compile the amalgamation on Windows
@@ -43,7 +59,7 @@ jobs:
4359
steps:
4460
- name: "Download SQLite source and build amalgamation"
4561
run: |
46-
wget -O sqlite3.tar.gz '${{ matrix.sqlite-url-version.url }}'
62+
curl -sS -L '${{ matrix.sqlite-url-version.url }}' -o sqlite3.tar.gz
4763
mkdir sqlite3
4864
tar -zxvf sqlite3.tar.gz --strip-components=1 -C sqlite3
4965
cd sqlite3
@@ -57,7 +73,7 @@ jobs:
5773

5874
test:
5975
name: Test
60-
needs: [download-coverage-reporter, create-sqlite-amalgamation]
76+
needs: [download-coverage-reporter, download-minio, create-sqlite-amalgamation]
6177
strategy:
6278
matrix:
6379
os:
@@ -88,10 +104,16 @@ jobs:
88104
- uses: "actions/setup-python@v4"
89105
with:
90106
python-version: '${{ matrix.python-version }}'
91-
- uses: actions/download-artifact@v3
107+
- name: "Load reporter"
108+
uses: actions/download-artifact@v3
92109
with:
93110
name: reporter
94111
path: ./reporter
112+
- name: "Load MinIO"
113+
uses: actions/download-artifact@v3
114+
with:
115+
name: minio
116+
path: ./minio
95117
- name: "Load SQLite amalgamation"
96118
if: matrix.sqlite-version != 'default'
97119
uses: actions/download-artifact@v3
@@ -114,9 +136,8 @@ jobs:
114136
- name: "Test (Windows)"
115137
if: matrix.os == 'windows-2019'
116138
run: |
117-
Invoke-WebRequest -Uri "https://dl.min.io/server/minio/release/windows-amd64/archive/minio.RELEASE.2023-07-21T21-12-44Z" -OutFile "./minio.exe"
118139
mkdir -p ./data
119-
./minio.exe server ./data &
140+
./minio/minio-windows.exe server ./data &
120141
do {
121142
Write-Host "Waiting for MinIO"
122143
sleep 3
@@ -127,10 +148,9 @@ jobs:
127148
- name: "Test (Ubuntu)"
128149
if: matrix.os == 'ubuntu-20.04'
129150
run: |
130-
wget -O minio https://dl.min.io/server/minio/release/linux-amd64/archive/minio.RELEASE.2023-07-21T21-12-44Z
131-
chmod +x minio
132151
mkdir -p ./data
133-
./minio server ./data &
152+
chmod +x ./minio/minio-linux
153+
./minio/minio-linux server ./data &
134154
until nc -w 10 127.0.0.1 9000; do sleep 1; done
135155
coverage run -m unittest
136156
coverage xml
@@ -140,10 +160,9 @@ jobs:
140160
- name: "Test (macOS)"
141161
if: matrix.os == 'macos-11'
142162
run: |
143-
wget -O minio https://dl.min.io/server/minio/release/darwin-amd64/archive/minio.RELEASE.2023-07-21T21-12-44Z
144-
chmod +x minio
145163
mkdir -p ./data
146-
./minio server ./data &
164+
chmod +x ./minio/minio-darwin
165+
./minio/minio-darwin server ./data &
147166
until nc -w 10 127.0.0.1 9000; do sleep 1; done
148167
coverage run -m unittest
149168
coverage xml

0 commit comments

Comments
 (0)