update e2e #3827
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: e2e_race | |
on: [push, pull_request] | |
jobs: | |
build: | |
name: End-to-End Test (Race) | |
runs-on: | |
group: vitess-ubuntu20 | |
env: | |
GOPRIVATE: github.com/slackhq/vitess-addons | |
GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} | |
steps: | |
- name: Check if workflow needs to be skipped | |
id: skip-workflow | |
run: | | |
skip='false' | |
echo Skip ${skip} | |
echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT | |
- name: Check out code | |
if: steps.skip-workflow.outputs.skip-workflow == 'false' | |
uses: actions/checkout@v3 | |
- name: Check for changes in relevant files | |
if: steps.skip-workflow.outputs.skip-workflow == 'false' | |
uses: frouioui/paths-filter@main | |
id: changes | |
with: | |
token: '' | |
filters: | | |
end_to_end: | |
- 'go/**/*.go' | |
- 'test.go' | |
- 'Makefile' | |
- 'build.env' | |
- 'go.sum' | |
- 'go.mod' | |
- 'proto/*.proto' | |
- 'tools/**' | |
- 'config/**' | |
- 'bootstrap.sh' | |
- '.github/workflows/e2e_race.yml' | |
- name: Set up Go | |
if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' | |
uses: actions/setup-go@v3 | |
with: | |
go-version: 1.21.10 | |
- name: Setup github.com/slackhq/vitess-additions access token | |
run: git config --global url.https://[email protected]/.insteadOf https://github.com/ | |
- name: Tune the OS | |
if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' | |
run: | | |
echo '1024 65535' | sudo tee -a /proc/sys/net/ipv4/ip_local_port_range | |
- name: Get dependencies | |
if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' | |
run: | | |
# Get key to latest MySQL repo | |
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A8D3785C | |
# Setup MySQL 8.0 | |
wget -c https://dev.mysql.com/get/mysql-apt-config_0.8.29-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 xz-utils | |
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 | |
- name: Run make minimaltools | |
if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' | |
run: | | |
make minimaltools | |
- name: e2e_race | |
if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' | |
uses: nick-fields/retry@v2 | |
with: | |
timeout_minutes: 30 | |
max_attempts: 3 | |
retry_on: error | |
command: | | |
make e2e_test_race |