build(deps): bump golang.org/x/tools from 0.1.5 to 0.19.0 #326
Workflow file for this run
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
name: Cluster (upgrade) | |
on: [push, pull_request] | |
jobs: | |
get_release_matrix: | |
if: github.repository == 'vitessio/vitess' | |
name: Get matrix for endtoend tests on Cluster (upgrade) | |
runs-on: ubuntu-latest | |
outputs: | |
matrix: ${{ steps.set-releases.outputs.matrix }} | |
steps: | |
- name: Check out to HEAD | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Get latest Vitess tag | |
run: | | |
last_major_releases=$(git show-ref --tags | grep -E 'refs/tags/v[0-9]*.[0-9]*.0$' | sed 's/[a-z0-9]* refs\/tags\/v//' | sort -nr | head -n4 | tail -n3) | |
last_major_release_nb=$(echo "$last_major_releases" | head -n1 | sed 's/.[0-9]*.[0-9]*$//') | |
last_minor_release=$(git show-ref --tags | grep -E "refs/tags/v$last_major_release_nb.[0-9]*.[1-9]*$" | sed 's/[a-z0-9]* refs\/tags\/v//' | sort -nr | head -n1) | |
major_and_minor_releases=$last_major_releases | |
if [ "$last_minor_release" != " " ]; | |
then | |
major_and_minor_releases=$(echo -e "$last_major_releases\n$last_minor_release") | |
fi | |
echo "latest_releases=$(echo "$major_and_minor_releases" | awk ' BEGIN { ORS = ""; print "["; } { print "\/\@{\\\"project\\\":\\\"v"$0"\\\"}\/\@"; } END { print "]"; }' | sed "s^\/\@\/\@^, ^g;s^\/\@^^g")" >> $GITHUB_ENV | |
- name: Set Releases | |
id: set-releases | |
run: | | |
echo "::set-output name=matrix::{\"include\":${{ env.latest_releases }} }" | |
build: | |
if: github.repository == 'vitessio/vitess' | |
name: Run endtoend tests on Cluster (upgrade) | |
runs-on: ubuntu-latest | |
needs: | |
- get_release_matrix | |
strategy: | |
fail-fast: false | |
matrix: ${{fromJSON(needs.get_release_matrix.outputs.matrix)}} | |
steps: | |
- name: Set up Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: 1.17.12 | |
- name: Tune the OS | |
run: | | |
echo '1024 65535' | sudo tee -a /proc/sys/net/ipv4/ip_local_port_range | |
- name: Check out ${{ matrix.project }} | |
uses: actions/checkout@v2 | |
with: | |
ref: ${{ matrix.project }} | |
- name: Get dependencies | |
run: | | |
# This prepares general purpose binary dependencies | |
# as well as latest version specific go modules | |
# Setup MySQL 8.0 | |
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 467B942D3A79BD29 | |
wget -c https://dev.mysql.com/get/mysql-apt-config_0.8.20-1_all.deb | |
echo mysql-apt-config mysql-apt-config/select-server select mysql-8.0 | sudo debconf-set-selections | |
sudo DEBIAN_FRONTEND="noninteractive" dpkg -i mysql-apt-config* | |
sudo apt-get update | |
# Install everything else we need, and configure | |
sudo apt-get install -y mysql-server mysql-client make unzip g++ etcd curl git wget eatmydata | |
sudo service mysql stop | |
sudo service etcd stop | |
sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ | |
sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld | |
go mod download | |
wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb | |
sudo apt-get install -y gnupg2 | |
sudo dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb | |
sudo apt-get update | |
sudo apt-get install percona-xtrabackup-24 | |
- name: Building ${{ matrix.project }} binaries | |
timeout-minutes: 10 | |
run: | | |
# We build latest version binaries and save them in a temporary location | |
source build.env | |
make build | |
mkdir -p /tmp/vitess-build-${{ matrix.project }}/ | |
cp -R bin /tmp/vitess-build-${{ matrix.project }}/ | |
- name: Run cluster endtoend test ${{ matrix.project }} (create cluster) | |
timeout-minutes: 5 | |
run: | | |
# By checking out we deleted bin/ directory. We now restore our pre-built latest version binaries | |
cp -R /tmp/vitess-build-${{ matrix.project }}/bin . | |
# create the directory where we store test data; ensure it is empty: | |
rm -rf /tmp/vtdataroot | |
mkdir -p /tmp/vtdataroot | |
source build.env | |
# We pass -skip-build so that we use the latest version binaries, not HEAD binaries | |
eatmydata -- go run test.go -skip-build -keep-data -docker=false -print-log -follow -shard 28 | |
- name: Check out HEAD | |
uses: actions/checkout@v2 | |
- name: Building HEAD binaries | |
timeout-minutes: 10 | |
run: | | |
go mod download | |
source build.env | |
make build | |
mkdir -p /tmp/vitess-build-head/ | |
cp -R bin /tmp/vitess-build-head/ | |
- name: Run cluster endtoend test HEAD based on ${{ matrix.project }} data (upgrade path) | |
timeout-minutes: 5 | |
run: | | |
# /tmp/vtdataroot exists from previous test | |
source build.env | |
# We built HEAD binaries manually in previous step and there's no need for the test to build. | |
eatmydata -- go run test.go -skip-build -keep-data -docker=false -print-log -follow -shard 28 | |
- name: Run cluster endtoend test HEAD (create cluster) | |
timeout-minutes: 5 | |
run: | | |
# create the directory where we store test data; ensure it is empty: | |
rm -rf /tmp/vtdataroot | |
mkdir -p /tmp/vtdataroot | |
source build.env | |
# We still have the binaries from previous step. No need to build | |
eatmydata -- go run test.go -skip-build -keep-data -docker=false -print-log -follow -shard 28 | |
- name: Run cluster endtoend test ${{ matrix.project }} based on HEAD data (downgrade path) | |
timeout-minutes: 5 | |
run: | | |
# /tmp/vtdataroot exists from previous test | |
cp -R /tmp/vitess-build-${{ matrix.project }}/bin . | |
source build.env | |
# We again built manually and there's no need for the test to build. | |
eatmydata -- go run test.go -skip-build -keep-data -docker=false -print-log -follow -shard 28 |