-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Github Workflow for testing with docker-compose (#299)
* Add Github Workflow for testing with docker-compose * Use docker-compose instead of docker compose in workflow * Try failing test in workflow * Revert to working tests * Rename Docker to CI in test.yaml Co-authored-by: Paul Cretu <paul.s.cretu@gmail.com> * Update actions checkout to v4 from v2 Co-authored-by: Paul Cretu <paul.s.cretu@gmail.com> * Run tests on push to main Co-authored-by: Paul Cretu <paul.s.cretu@gmail.com> * Rename test.yaml to ci.yaml. Uncomment 3000 port mapping --------- Co-authored-by: Paul Cretu <paul.s.cretu@gmail.com>
- Loading branch information
Showing
4 changed files
with
35 additions
and
9 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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Build containers | ||
run: docker-compose build --build-arg MIX_ENV=test | ||
|
||
- name: Start containers | ||
run: docker-compose up -d db cache | ||
|
||
- name: Run tests | ||
run: docker-compose run web bash -c 'cd server && mix test' |
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
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