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

Docs: Improve documentation with regards to running tests locally #613

24 changes: 19 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,23 @@
name: test
on: [push]
name: Test suite

on:
push:
branches:
- main
- develop
pull_request:

jobs:
test:
backend-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: sudo docker-compose --env-file .env-github-actions run server bash -c "python manage.py test"
- run: sudo docker-compose --env-file .env-github-actions run client yarn test --watchAll=false
- name: Run Backend Tests
run: sudo docker-compose --env-file .env-github-actions run server bash -c "python manage.py test"

frontend-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Run Frontend Tests
run: sudo docker-compose --env-file .env-github-actions run client yarn test --watchAll=false
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![DOI](https://zenodo.org/badge/418963353.svg)](https://zenodo.org/badge/latestdoi/418963353)
[![DOI](https://zenodo.org/badge/418963353.svg)](https://zenodo.org/badge/latestdoi/418963353) [![Test](https://github.com/Amsterdam-Music-Lab/MUSCLE/actions/workflows/test.yml/badge.svg)](https://github.com/Amsterdam-Music-Lab/MUSCLE/actions/workflows/test.yml/badge.svg)

# MUSic-related Citizen Science Listening Experiments (MUSCLE)
This application provides an easy way to implement and run online listening experiments for music research. It presents questions, and typically audio stimuli, to participants, and collects their feedback.
Expand Down
3 changes: 3 additions & 0 deletions scripts/test-back
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash
docker-compose run --rm server bash -c "python manage.py test"

3 changes: 3 additions & 0 deletions scripts/test-front
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash
docker-compose run --rm client yarn test --watchAll=false

3 changes: 3 additions & 0 deletions scripts/test-front-watch
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash
docker-compose run --rm client yarn test --watchAll=true

2 changes: 0 additions & 2 deletions test-back

This file was deleted.

2 changes: 0 additions & 2 deletions test-front

This file was deleted.