This repository has been archived by the owner on Sep 12, 2024. It is now read-only.
Navigation rework #65
Workflow file for this run
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: "Scoro" | |
on: | |
pull_request: | |
branches: [ main ] | |
jobs: | |
changes: | |
runs-on: ubuntu-latest | |
# Required permissions | |
permissions: | |
pull-requests: read | |
# Set job outputs to values from filter step | |
outputs: | |
back: ${{ steps.filter.outputs.back }} | |
front: ${{ steps.filter.outputs.front }} | |
scorometer: ${{ steps.filter.outputs.scorometer }} | |
steps: | |
# For pull requests it's not necessary to checkout the code | |
- uses: dorny/paths-filter@v2 | |
id: filter | |
with: | |
filters: | | |
back: | |
- 'back/**' | |
- '.github/workflows/back.yml' | |
front: | |
- 'front/**' | |
- '.github/workflows/front.yml' | |
scorometer: | |
- 'scorometer/**' | |
- '.github/workflows/scoro.yml' | |
scoro_test: | |
runs-on: ubuntu-latest | |
needs: changes | |
if: ${{ needs.changes.outputs.scorometer == 'true' }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
fetch-depth: 0 | |
- name: Copy env file to github secret env file | |
run: cp .env.example .env | |
- name: Build and start the service | |
run: docker-compose up -d meilisearch back db | |
- name: Perform healthchecks | |
run: | | |
docker-compose ps -a | |
docker-compose logs | |
wget --retry-connrefused http://localhost:3000 || (docker-compose logs && exit 1) | |
- name: Run scorometer tests | |
run: | | |
export API_KEY_SCORO_TEST=SCOROTEST | |
export API_KEY_SCORO=SCORO | |
pip install -r scorometer/requirements.txt | |
cd scorometer/tests && ./runner.sh | |
- name: stop the service | |
run: docker-compose down |