Merge pull request #3 from national-data-platform/fix-redirect #37
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: CI/CD | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
build-run-test: | |
name: Build, run, and test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Build svcs | |
run: docker compose build | |
- name: Run svcs | |
run: docker compose -f docker-compose.gitactions.yaml up -d | |
# - name: watch svcs logs | |
# run: docker compose logs -f -t | |
- name: Wait for svcs | |
run: while [ $(curl -LI http://0.0.0.0:5000 -u admin:password -o /dev/null -w '%{http_code}\n' -s) != "200" ] ; do echo waiting...$(curl -LI http://0.0.0.0:5000 -u admin:password -o /dev/null -w '%{http_code}\n' -s) ; sleep 2 ; done | |
- name: Install requirements | |
run: pip3 install -r tests/requirements.txt | |
- name: Run tests | |
run: cd tests && python3 mlflow_test.py | |
- name: Clean up | |
run: docker compose -f docker-compose.gitactions.yaml down --volumes |