Merge pull request #33 from lukasberanek-tpa/fix/move-types-to-dev-deps #79
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
name: Test | |
on: | |
push: | |
branches: | |
- "**" | |
jobs: | |
test: | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
version: ["latest"] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Create docker volume texterify-database | |
run: docker volume create --name=texterify-database | |
- name: Create docker volume texterify-assets | |
run: docker volume create --name=texterify-assets | |
- name: Run docker-compose | |
run: RAILS_ENV=test TEXTERIFY_TAG=${{ matrix.version }} docker-compose up -d | |
- name: Create and seed test database | |
run: docker-compose exec -T app bundle exec rails db:create db:migrate db:seed RAILS_ENV=test | |
- name: Install test dependencies in app | |
run: docker-compose exec -T app bundle install --with test | |
- name: Install dependencies | |
run: yarn | |
- name: Restart containers for test gems to be considered | |
run: docker-compose restart | |
- name: Wait for containers to start | |
run: sleep 10 | |
- name: Run docker ps | |
run: docker ps | |
- name: Get instance debug infos | |
run: curl "http://localhost:3000/api/v1/instance/debug?secret=secret" | |
- name: Run tests | |
run: yarn test | |
- name: Output docker app logs | |
if: always() | |
run: docker logs texterify-cli_app_1 | |
- name: Output docker db logs | |
if: always() | |
run: docker logs texterify-cli_db_1 |