From c33345cb518df56666df7acb977078accc69f70e Mon Sep 17 00:00:00 2001 From: Trim21 Date: Fri, 12 May 2023 09:34:18 +0800 Subject: [PATCH] start minio first --- .github/workflows/nodejs-windows.yml | 46 ---------------------- .github/workflows/{nodejs.yml => test.yml} | 45 ++++++++++++++------- 2 files changed, 31 insertions(+), 60 deletions(-) delete mode 100644 .github/workflows/nodejs-windows.yml rename .github/workflows/{nodejs.yml => test.yml} (50%) diff --git a/.github/workflows/nodejs-windows.yml b/.github/workflows/nodejs-windows.yml deleted file mode 100644 index ecb3b7a3..00000000 --- a/.github/workflows/nodejs-windows.yml +++ /dev/null @@ -1,46 +0,0 @@ -name: CI- Windows - -on: - push: - branches-ignore: - - dependabot/** - pull_request: - branches: - - master - -jobs: - test: - name: Test on node ${{ matrix.node_version }} and ${{ matrix.os }} - runs-on: ${{ matrix.os }} - strategy: - max-parallel: 2 - matrix: - node_version: [12.x, 14.x, 16.x, 18.x, 20.x] - os: [windows-latest] - steps: - - uses: actions/checkout@v3 - - name: Use Node.js ${{ matrix.node_version }} - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node_version }} - cache: 'npm' - - - run: npm i - - - name: Start MinIO Server -> Run Unit and Functional Tests - timeout-minutes: 10 - env: - CI: true - MINIO_CI_CD: true - MINT_MODE: full - SERVER_ENDPOINT: localhost:9000 - MINIO_ROOT_USER: minio - MINIO_ROOT_PASSWORD: minio123 - MINIO_KMS_SECRET_KEY: 'my-minio-key:OSMM+vkKUTCvQs9YL/CVMIMt43HFhkUpqJxTmGl6rYw=' - ACCESS_KEY: minio - SECRET_KEY: minio123 - ENABLE_HTTPS: 0 - run: | - Invoke-WebRequest -Uri https://dl.minio.io/server/minio/release/windows-amd64/minio.exe -OutFile $HOME/minio.exe - Start-Process -NoNewWindow -FilePath "$HOME/minio.exe" -ArgumentList "-C", "$env:temp/minio-config", "server", "$env:temp/data{1...4}" - npm run test diff --git a/.github/workflows/nodejs.yml b/.github/workflows/test.yml similarity index 50% rename from .github/workflows/nodejs.yml rename to .github/workflows/test.yml index 0893cb91..e78a4672 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/test.yml @@ -1,4 +1,4 @@ -name: CI - Linux +name: CI - Test on: push: @@ -13,11 +13,36 @@ jobs: name: Test on node ${{ matrix.node_version }} and ${{ matrix.os }} runs-on: ${{ matrix.os }} strategy: - max-parallel: 2 + max-parallel: 5 matrix: - node_version: [12.x, 14.x, 16.x, 18.x, 20.x] - os: [ubuntu-latest] + node_version: [ 20.x, 18.x, 16.x, 14.x, 12.x, ] + os: [ ubuntu-latest, windows-latest ] + + env: + MINIO_ROOT_USER: minio + MINIO_ROOT_PASSWORD: minio123 + MINIO_KMS_SECRET_KEY: 'my-minio-key:OSMM+vkKUTCvQs9YL/CVMIMt43HFhkUpqJxTmGl6rYw=' + MINIO_CI_CD: true + SERVER_ENDPOINT: localhost:9000 + steps: + - name: Start Server + if: ${{ matrix.os == 'ubuntu-latest' }} + run: | + wget --quiet -O /tmp/minio https://dl.min.io/server/minio/release/linux-amd64/minio + chmod +x /tmp/minio + /tmp/minio -C /tmp/minio-config server /tmp/data{1...4} & + + + - run: Invoke-WebRequest -Uri https://dl.minio.io/server/minio/release/windows-amd64/minio.exe -OutFile $HOME/minio.exe + if: ${{ matrix.os == 'windows-latest' }} + + - name: Start MinIO Server + if: ${{ matrix.os == 'windows-latest' }} + shell: bash + run: | + $HOME/minio.exe -C $HOME/tmp/minio-config server $HOME/tmp/data{1...4} & + - uses: actions/checkout@v3 - name: Use Node.js ${{ matrix.node_version }} uses: actions/setup-node@v3 @@ -27,21 +52,13 @@ jobs: - run: npm i - - name: Start Server -> Run Unit and Functional Tests + - name: Run Unit and Functional Tests timeout-minutes: 10 env: CI: true MINIO_CI_CD: true MINT_MODE: full - SERVER_ENDPOINT: localhost:9000 - MINIO_ROOT_USER: minio - MINIO_ROOT_PASSWORD: minio123 - MINIO_KMS_SECRET_KEY: 'my-minio-key:OSMM+vkKUTCvQs9YL/CVMIMt43HFhkUpqJxTmGl6rYw=' ACCESS_KEY: minio SECRET_KEY: minio123 ENABLE_HTTPS: 0 - run: | - wget --quiet -O /tmp/minio https://dl.min.io/server/minio/release/linux-amd64/minio - chmod +x /tmp/minio - /tmp/minio -C /tmp/minio-config server /tmp/data{1...4} & - npm run test + run: npm run test