Skip to content

Commit

Permalink
Merge pull request #364 from Shopify/2024-09-11/update-actions
Browse files Browse the repository at this point in the history
Update outdated GH Actions
  • Loading branch information
driv3r authored Sep 11, 2024
2 parents f19a5e3 + 0a4e59c commit 65bd2d3
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 137 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
15 changes: 8 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,31 +12,32 @@ 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

- name: Building Ghostferry
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: |
Expand Down
12 changes: 2 additions & 10 deletions .github/workflows/start-mysql.sh
Original file line number Diff line number Diff line change
@@ -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
Expand Down
84 changes: 39 additions & 45 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Ghostferry MySQL 8.0 tests
name: Ghostferry Tests

on:
push:
Expand All @@ -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

Expand All @@ -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

Expand All @@ -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
Expand All @@ -71,44 +86,23 @@ 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

- name: Building Ghostferry
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"
74 changes: 0 additions & 74 deletions .github/workflows/tests_5.7.yml

This file was deleted.

0 comments on commit 65bd2d3

Please sign in to comment.