Update README.md #13
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: check-services | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
list-services: | |
runs-on: ubuntu-latest | |
outputs: | |
matrix: ${{ steps.set-matrix.outputs.matrix }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
cache: 'pip' | |
cache-dependency-path: | | |
requirements.txt | |
checkers/requirements.txt | |
- name: install requirements | |
run: pip install -r requirements.txt | |
- name: install checkers requirements | |
run: pip install -r checkers/requirements.txt | |
- name: list services, set matrix | |
id: set-matrix | |
run: ./check.py list | |
check-single-service: | |
runs-on: ubuntu-latest | |
needs: list-services | |
strategy: | |
matrix: ${{ fromJson(needs.list-services.outputs.matrix) }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
cache: 'pip' | |
cache-dependency-path: | | |
requirements.txt | |
checkers/requirements.txt | |
- name: install requirements | |
run: pip install -r requirements.txt | |
- name: install checkers requirements | |
run: pip install -r checkers/requirements.txt | |
- name: validate service ${{ matrix.service }} | |
run: ./check.py validate | |
env: | |
SERVICE: ${{ matrix.service }} | |
- name: up service ${{ matrix.service }} | |
run: ./check.py up | |
env: | |
SERVICE: ${{ matrix.service }} | |
- name: wait for service ${{ matrix.service }} | |
run: sleep 30 | |
- name: check service ${{ matrix.service }} small | |
run: ./check.py check | |
env: | |
SERVICE: ${{ matrix.service }} | |
RUNS: 10 | |
- name: down service ${{ matrix.service }} | |
run: ./check.py down | |
env: | |
SERVICE: ${{ matrix.service }} | |
- name: up service ${{ matrix.service }} | |
run: ./check.py up | |
env: | |
SERVICE: ${{ matrix.service }} | |
- name: wait for service ${{ matrix.service }} | |
run: sleep 30 | |
- name: check service ${{ matrix.service }} big | |
run: ./check.py check | |
env: | |
SERVICE: ${{ matrix.service }} | |
RUNS: 100 | |
- name: down service ${{ matrix.service }} | |
run: ./check.py down | |
env: | |
SERVICE: ${{ matrix.service }} | |
if: ${{ always() }} | |
- name: logs after failure | |
run: ./check.py logs | |
if: ${{ failure() }} | |
check-all-services: | |
runs-on: ubuntu-latest | |
needs: check-single-service | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
cache: 'pip' | |
cache-dependency-path: | | |
requirements.txt | |
checkers/requirements.txt | |
- name: install requirements | |
run: pip install -r requirements.txt | |
- name: install checkers requirements | |
run: pip install -r checkers/requirements.txt | |
- name: up all services | |
run: ./check.py up | |
env: | |
SERVICE: all | |
- name: wait for services | |
run: sleep 30 | |
- name: check all services | |
run: ./check.py check | |
env: | |
SERVICE: all | |
RUNS: 50 | |
- name: down all services | |
run: ./check.py down | |
env: | |
SERVICE: all | |
if: ${{ always() }} | |
- name: logs after failure | |
run: ./check.py logs | |
if: ${{ failure() }} |