diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index a37e5366..7c934377 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -9,7 +9,7 @@ jobs: github-pages: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Build documentations run: .github/workflows/build-docs.sh diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7f990459..496d68bf 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,10 +12,10 @@ jobs: runner: [ubuntu-latest, shopify-ubuntu-arm64] runs-on: ${{ matrix.runner }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Setup Go - uses: actions/setup-go@v2 + uses: actions/setup-go@v5 with: go-version: 1.16 @@ -23,20 +23,21 @@ jobs: run: .github/workflows/build-deb.sh - name: Upload debs - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: debs-${{ github.sha }} + name: debs-${{ github.sha }}-${{ matrix.runner }} path: build/ghostferry* release: runs-on: ubuntu-latest needs: build-debs steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Fetch uploaded artifacts - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: - name: debs-${{ github.sha }} + pattern: debs-${{ github.sha }}-* ++ merge-multiple: true - name: shasum shell: bash run: | diff --git a/.github/workflows/start-mysql.sh b/.github/workflows/start-mysql.sh index adbdd308..faf3e44b 100755 --- a/.github/workflows/start-mysql.sh +++ b/.github/workflows/start-mysql.sh @@ -1,18 +1,10 @@ #!/bin/bash set -xe -DOCKER_COMPOSE_VERSION=v2.2.3 - -sudo apt-get update -sudo apt-get install -y netcat-openbsd make gcc - -sudo curl -o /usr/local/bin/docker-compose -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` -sudo chmod +x /usr/local/bin/docker-compose - if [ "$MYSQL_VERSION" == "8.0" ]; then - docker-compose -f docker-compose_8.0.yml up -d mysql-1 mysql-2 + docker compose -f docker-compose_8.0.yml up -d mysql-1 mysql-2 else - docker-compose up -d mysql-1 mysql-2 + docker compose up -d mysql-1 mysql-2 fi MAX_ATTEMPTS=60 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index df63c2a3..661cf91a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,4 +1,4 @@ -name: Ghostferry MySQL 8.0 tests +name: Ghostferry Tests on: push: @@ -8,16 +8,21 @@ on: jobs: gh-285: + strategy: + matrix: + mysql: ["5.7", "8.0"] + runs-on: ubuntu-latest + continue-on-error: true timeout-minutes: 15 + env: CI: "true" - MYSQL_VERSION: "8.0" - steps: - - uses: actions/checkout@v2 + MYSQL_VERSION: ${{ matrix.mysql }} - - name: Setup Go - uses: actions/setup-go@v2 + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 with: go-version: 1.16 @@ -26,17 +31,23 @@ jobs: - name: Running GH-285 test run: ./examples/gh-285/bugreport.sh + go-test: + strategy: + matrix: + mysql: ["5.7", "8.0"] + runs-on: ubuntu-latest timeout-minutes: 15 + continue-on-error: true + env: CI: "true" - MYSQL_VERSION: "8.0" - steps: - - uses: actions/checkout@v2 + MYSQL_VERSION: ${{ matrix.mysql }} - - name: Setup Go - uses: actions/setup-go@v2 + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 with: go-version: 1.16 @@ -45,23 +56,27 @@ jobs: - name: Running Golang tests run: make test-go + ruby-test: + strategy: + matrix: + mysql: ["5.7", "8.0"] + runs-on: ubuntu-latest timeout-minutes: 15 + continue-on-error: true + env: CI: "true" BUNDLE_WITHOUT: "development" - MYSQL_VERSION: "8.0" - steps: - - uses: actions/checkout@v2 + MYSQL_VERSION: ${{ matrix.mysql }} - - name: Setup Golang - uses: actions/setup-go@v2 + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 with: go-version: 1.16 - - - name: Setup Ruby - uses: ruby/setup-ruby@v1 + - uses: ruby/setup-ruby@v1 with: ruby-version: 3.2 bundler-cache: true @@ -71,16 +86,15 @@ jobs: - name: Running Ruby tests run: bundle exec ruby test/main.rb + build-debs: strategy: matrix: runner: [ubuntu-latest, shopify-ubuntu-arm64] runs-on: ${{ matrix.runner }} steps: - - uses: actions/checkout@v2 - - - name: Setup Go - uses: actions/setup-go@v2 + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 with: go-version: 1.16 @@ -88,27 +102,7 @@ jobs: run: .github/workflows/build-deb.sh - name: Upload debs - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: debs-${{ github.sha }} + name: debs-${{ github.sha }}-${{ matrix.runner }} path: build/ghostferry* - - checksum-debs: - runs-on: ubuntu-latest - needs: build-debs - steps: - - name: Fetch uploaded artifacts - uses: actions/download-artifact@v3 - with: - name: debs-${{ github.sha }} - - name: shasum - shell: bash - run: | - sha256sum *.deb > ghostferry-$GITHUB_SHA.sha256sum - echo "sha256sum:" - cat ghostferry-$GITHUB_SHA.sha256sum - - name: Upload checksum - uses: actions/upload-artifact@v3 - with: - name: debs-${{ github.sha }} - path: "*.sha256sum" diff --git a/.github/workflows/tests_5.7.yml b/.github/workflows/tests_5.7.yml deleted file mode 100644 index ec6ae217..00000000 --- a/.github/workflows/tests_5.7.yml +++ /dev/null @@ -1,74 +0,0 @@ -name: Ghostferry MySQL 5.7 tests - -on: - push: - branches: - - main - pull_request: - -jobs: - gh-285: - runs-on: ubuntu-latest - timeout-minutes: 15 - env: - CI: "true" - MYSQL_VERSION: "5.7" - steps: - - uses: actions/checkout@v2 - - - name: Setup Go - uses: actions/setup-go@v2 - with: - go-version: 1.16 - - - name: Starting up MySQL - run: .github/workflows/start-mysql.sh - - - name: Running GH-285 test - run: ./examples/gh-285/bugreport.sh - go-test: - runs-on: ubuntu-latest - timeout-minutes: 15 - env: - CI: "true" - MYSQL_VERSION: "5.7" - steps: - - uses: actions/checkout@v2 - - - name: Setup Go - uses: actions/setup-go@v2 - with: - go-version: 1.16 - - - name: Starting up MySQL - run: .github/workflows/start-mysql.sh - - - name: Running Golang tests - run: make test-go - ruby-test: - runs-on: ubuntu-latest - timeout-minutes: 15 - env: - CI: "true" - MYSQL_VERSION: "5.7" - BUNDLE_WITHOUT: "development" - steps: - - uses: actions/checkout@v2 - - - name: Setup Golang - uses: actions/setup-go@v2 - with: - go-version: 1.16 - - - name: Setup Ruby - uses: ruby/setup-ruby@v1 - with: - ruby-version: 3.2 - bundler-cache: true - - - name: Starting up MySQL - run: .github/workflows/start-mysql.sh - - - name: Running Ruby tests - run: bundle exec ruby test/main.rb -