Read category/subcategory from bst analyzer v2 #159
This file contains hidden or 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: Freesound Search Tests | |
| on: | |
| push: | |
| branches: [ master ] | |
| paths: | |
| - 'utils/search/**' | |
| - 'freesound/settings.py' | |
| pull_request: | |
| branches: [ '*' ] | |
| paths: | |
| - 'utils/search/**' | |
| - 'freesound/settings.py' | |
| jobs: | |
| test-search: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Setup | |
| run: bash -c 'mkdir -p ./freesound-data/{packs,uploads,avatars} && echo FS_USER_ID_FROM_ENV=$(id -u) > .env && cp freesound/local_settings.example.py freesound/local_settings.py' | |
| - name: update settings file | |
| run: sed -i 's#^DISPLAY_DEBUG_TOOLBAR.*#DISPLAY_DEBUG_TOOLBAR = False#' freesound/local_settings.py | |
| - name: Login to Docker Hub | |
| run: echo ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | docker login -u ${{ secrets.DOCKER_HUB_USERNAME }} --password-stdin | |
| continue-on-error: true | |
| - name: Pull docker images | |
| run: docker compose -f docker-compose.test.yml pull db search | |
| - name: Build test_runner image | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: . | |
| file: ./docker/Dockerfile.workers_web | |
| target: freesound_test | |
| tags: freesound-test:ci | |
| load: true | |
| cache-from: type=gha,scope=test_runner | |
| cache-to: type=gha,mode=max,scope=test_runner | |
| - name: Run tests | |
| run: docker compose -f docker-compose.test.yml run --rm test_runner_search pytest -m "search_engine" | |
| #- name: Notify success | |
| # uses: voxmedia/github-action-slack-notify-build@v1 | |
| # continue-on-error: true | |
| # if: success() | |
| # with: | |
| # message_id: ${{ steps.slack.outputs.message_id }} | |
| # channel_id: ${{ secrets.SLACK_NOTIFICATIONS_CHANNEL_ID }} | |
| # status: SUCCESS | |
| # color: good | |
| # env: | |
| # SLACK_BOT_TOKEN: ${{ secrets.SLACK_NOTIFICATIONS_BOT_TOKEN }} | |
| #- name: Notify failure | |
| # uses: voxmedia/github-action-slack-notify-build@v1 | |
| # if: failure() | |
| # with: | |
| # message_id: ${{ steps.slack.outputs.message_id }} | |
| # channel_id: ${{ secrets.SLACK_NOTIFICATIONS_CHANNEL_ID }} | |
| # status: FAILED | |
| # color: danger | |
| # env: | |
| # SLACK_BOT_TOKEN: ${{ secrets.SLACK_NOTIFICATIONS_BOT_TOKEN }} |