Skip to content

Commit ad064c3

Browse files
authored
add CI workflow for mariadb+mysql (#2)
1 parent 9122524 commit ad064c3

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

.github/workflows/main.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ jobs:
1414
smoke-test:
1515
name: Setup infrastructure
1616
runs-on: ubuntu-latest
17+
strategy:
18+
matrix:
19+
# run test with the default, which is "mariadb", and the feature flag
20+
# which will run mysql in a separate container
21+
mysql-feature-flag: ["default (mariadb)", "mysql"]
1722
steps:
1823
- name: Checkout
1924
uses: actions/checkout@v3
@@ -36,11 +41,17 @@ jobs:
3641
env:
3742
LOCALSTACK_API_KEY: ${{ secrets.LOCALSTACK_API_KEY }}
3843
LOCALSTACK_VOLUME_DIR: ${{ github.workspace }}/ls_test
44+
MYSQL_FEATURE_FLAG: ${{ matrix.mysql-feature-flag }}
3945
run: |
4046
mkdir ls_test
47+
ls -la ls_test
4148
docker pull localstack/localstack-pro:latest
4249
# Start LocalStack in the background
43-
DEBUG=1 RDS_MYSQL_DOCKER=1 localstack start -d
50+
if [ "mysql" == ${MYSQL_FEATURE_FLAG} ]; then
51+
DEBUG=1 RDS_MYSQL_DOCKER=1 localstack start -d
52+
else
53+
DEBUG=1 localstack start -d
54+
fi
4455
# Wait 30 seconds for the LocalStack container to become ready before timing out
4556
echo "Waiting for LocalStack startup..."
4657
localstack wait -t 15
@@ -77,6 +88,6 @@ jobs:
7788
exit 1
7889
fi
7990
- name: Show Logs
80-
if: failure()
91+
if: always()
8192
run: |
8293
localstack logs

0 commit comments

Comments
 (0)