-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: always use
just
to invoke docker in CI (#34)
Tests fail in CI sometimes for unknown reasons.
- Loading branch information
Showing
3 changed files
with
25 additions
and
17 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,34 +46,42 @@ jobs: | |
with: | ||
just-version: '1.13.0' | ||
|
||
- name: Create a copy of `.env.example` | ||
run: just dotenv | ||
- name: Retrieve User Permissions | ||
run: | | ||
echo DOCKER_USER=$(id -u):$(id -g) >> $GITHUB_ENV | ||
- name: Create Homeserver Configuration For Synapse | ||
run: just gen_synapse_conf | ||
|
||
- name: Use Test Homeserver | ||
run: | | ||
cp ./crates/test/fixtures/synapse/* ./docker/synapse | ||
cat ./docker/synapse/homeserver.yaml | ||
- name: Build Docker Containers | ||
run: | | ||
just backend --no-start | ||
- name: Run Docker Containers | ||
run: | | ||
docker compose up -d --build | ||
sleep 20 | ||
just backend -d | ||
- name: Wait for Healthy Container | ||
uses: raschmitt/[email protected] | ||
with: | ||
container-name: commune-rs-synapse-1 | ||
timeout: 30 | ||
|
||
- name: Create Admin User | ||
env: | ||
DOCKER_USER: ${{ env.DOCKER_USER }} | ||
run: just gen_synapse_admin | ||
|
||
- name: Check Synapse is Running | ||
run: curl -sSf http://localhost:8008 > /dev/null | ||
|
||
- name: Provide Database Backup & Test it | ||
run: | | ||
just backup_db | ||
just nuke_db | ||
just restore_db | ||
- name: Retrieve Admin Access Token | ||
run: | | ||
just get_access_token | ||
grep 'COMMUNE_SYNAPSE_ADMIN_TOKEN' .env | sed "s/'//g" >> $GITHUB_ENV | ||
- name: E2E Tests | ||
env: | ||
COMMUNE_SYNAPSE_ADMIN_TOKEN: ${{ env.COMMUNE_SYNAPSE_ADMIN_TOKEN }} | ||
|
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
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