Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Import database once MariaDB service is ready #170

Merged
merged 1 commit into from
Oct 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ jobs:
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Execute unit tests
run: |
dotnet test ./tests/Application.Tests/CTF.Application.Tests.csproj -c Release
run: dotnet test ./tests/Application.Tests/CTF.Application.Tests.csproj -c Release

integration_testing:
runs-on: ubuntu-latest
Expand All @@ -42,13 +41,15 @@ jobs:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Check sqlite3 version
run: sqlite3 --version
- name: Waiting for database availability
run: |
chmod u+x wait-for-it.sh
./wait-for-it.sh -t 60 127.0.0.1:3306
- name: Import databases
run: |
docker exec -i mariadb mariadb -uroot -p123456789 -h127.0.0.1 gamemode < ./scripts/mariadb/gamemode.sql
sqlite3 gamemode.db < ./scripts/sqlite/gamemode.sql
- name: Create .env files
run: |
cp ./tests/Persistence.Tests/.env.test.example ./tests/Persistence.Tests/.env.test
- name: Create .env.test file
run: cp ./tests/Persistence.Tests/.env.test.example ./tests/Persistence.Tests/.env.test
- name: Execute integration tests
run: |
dotnet test ./tests/Persistence.Tests/Persistence.Tests.csproj -c Release
run: dotnet test ./tests/Persistence.Tests/Persistence.Tests.csproj -c Release
Loading