-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #83 from store-craft/ci_tests_for_s3
ci/cd: using minio to test s3
- Loading branch information
Showing
10 changed files
with
168 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: S3 Compatible | ||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
|
||
jobs: | ||
|
||
test: | ||
name: Test | ||
env: | ||
_access_key: minioadmin | ||
_secret_key: minioadmin | ||
_bucket: test-bucket | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [22.x] | ||
steps: | ||
- name: Setup minio | ||
run: >- | ||
docker run -d -p 9000:9000 --name minio | ||
-e MINIO_ACCESS_KEY=${{env._access_key}} | ||
-e MINIO_SECRET_KEY=${{env._secret_key}} | ||
-v /tmp/data:/data -v /tmp/config:/root/.minio | ||
minio/minio server /data | ||
- run: wget https://dl.min.io/client/mc/release/linux-amd64/mc | ||
- run: chmod +x ./mc | ||
- run: ./mc alias set myminio http://127.0.0.1:9000 ${{env._access_key}} ${{env._secret_key}} | ||
- run: ./mc mb --ignore-existing myminio/${{env._bucket}} | ||
|
||
- name: Check out repository code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: 'npm' | ||
|
||
- name: Install dependencies | ||
working-directory: ./packages/storage/storage-s3-compatible | ||
run: npm ci | ||
|
||
- name: Test | ||
run: npm test | ||
working-directory: ./packages/storage/storage-s3-compatible | ||
env: | ||
ACCESS_KEY_ID: ${{env._access_key}} | ||
SECRET_ACCESS_KEY: ${{env._secret_key}} | ||
BUCKET: ${{env._bucket}} | ||
ENDPOINT: http://127.0.0.1:9000 | ||
REGION: us-east-1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.