Kyoo/.github/workflows/robot.yml
2023-03-17 01:30:18 +09:00

54 lines
1.1 KiB
YAML

name: RobotTests
on:
push:
branches:
- master
- next
pull_request:
jobs:
test:
name: Run Robot Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
fetch-depth: 0
- name: Pull images
run: |
cp .env.example .env
docker-compose pull
- name: Docker cache
uses: satackey/action-docker-layer-caching@v0.0.11
continue-on-error: true
- name: Build the app
run: docker-compose build
- name: Start the service
run: |
docker-compose up -d
- name: Perform healthchecks
run: |
docker-compose ps -a
wget --retry-connrefused --retry-on-http-error=502 http://localhost:8901 #/api/healthcheck
- name: Run robot tests
run: |
pip install -r back/tests/robot/requirements.txt
robot -d out back/tests/robot/
- name: Show logs
if: failure()
run: docker-compose logs
- uses: actions/upload-artifact@v2
with:
name: results
path: out