Skip to content

Commit

Permalink
finish pipeline
Browse files Browse the repository at this point in the history
Signed-off-by: Karl Hepworth <[email protected]>
  • Loading branch information
fubarhouse committed Jun 27, 2024
1 parent 3f57c67 commit 094bdde
Showing 1 changed file with 14 additions and 19 deletions.
33 changes: 14 additions & 19 deletions .github/workflows/functional-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ jobs:
with:
go-version: '1.21'

- name: Start MySQL
run: sudo /etc/init.d/mysql start

- name: Create Database
run: mysql -e 'CREATE DATABASE test_db;' -uroot -proot

- name: Set up MySQL
run: |
sudo /etc/init.d/mysql start
Expand All @@ -34,26 +40,15 @@ jobs:
- name: Dump database
run: bin/mtk-linux-amd64 dump test_db --port=3306 --user=root --password=root --host=127.0.0.1 > mtk-dump.sql

- name: Clean database file
run: sed '$d' mtk-dump.sql > mtk-dump-clean.sql

- name: Cat database
run: cat mtk-dump-clean.sql

- name: Cat database
run: cat mtk-dump.sql
- name: Drop Database
run: mysql -e 'DROP DATABASE test_db;' -uroot -proot

- name: Upload Artifact 1
uses: actions/upload-artifact@v4
with:
name: artifact-1
path: mtk-dump.sql
- name: Clean database file
run: |
sed '$d' mtk-dump.sql > mtk-dump-clean.sql
- name: Upload Artifact 2
uses: actions/upload-artifact@v4
with:
name: artifact-2
path: mtk-dump-clean.sql
- name: Import database
run: mysql -uroot -proot test_db < mtk-dump-clean.sql

- name: Generate diff
run: diff -q mtk-dump.sql mtk-dump-clean.sql
run: diff -q .github/workflows/functional-test.sql mtk-dump-clean.sql

0 comments on commit 094bdde

Please sign in to comment.