Open AWS storage to being used with non-AWS MySQL and S3 services #1821
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: Test Go | |
on: [push, pull_request] | |
permissions: | |
contents: read | |
jobs: | |
test: | |
strategy: | |
matrix: | |
go-version: [1.22.x, 1.23.x] | |
os: [ubuntu-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Fetch repo | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
persist-credentials: false | |
- name: Install Go | |
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.1.0 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- name: Run tests | |
run: go test -v -race ./... | |
test-mysql: | |
env: | |
DB_DATABASE: test_tessera | |
DB_USER: root | |
DB_PASSWORD: root | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
persist-credentials: false | |
- name: Start MySQL | |
run: | | |
sudo /etc/init.d/mysql start | |
mysql -e "CREATE DATABASE IF NOT EXISTS $DB_DATABASE;" -u$DB_USER -p$DB_PASSWORD | |
- name: Test with Go | |
run: go test -v -race ./storage/mysql/... -is_mysql_test_optional=false | |
test-aws-mysql: | |
env: | |
DB_DATABASE: test_tessera | |
DB_USER: root | |
DB_PASSWORD: root | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
persist-credentials: false | |
- name: Start MySQL | |
run: | | |
sudo /etc/init.d/mysql start | |
mysql -e "CREATE DATABASE IF NOT EXISTS $DB_DATABASE;" -u$DB_USER -p$DB_PASSWORD | |
- name: Test with Go | |
# Parallel tests are disabled for the MySQL test database to always be in a known state. | |
run: go test -p=1 -v -race ./storage/aws/... -is_mysql_test_optional=false |