add workflow #1
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: CKN-CI | |
on: [push, pull_request] | |
jobs: | |
start: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.8 | |
- name: Install Docker Compose | |
run: | | |
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose | |
sudo chmod +x /usr/local/bin/docker-compose | |
- name: Build Patra | |
run: | | |
docker compose -f docker-compose.yml up -d --build | |
- name: Test Patra | |
run: | | |
cd $GITHUB_WORKSPACE/tests | |
pip install -r requirements.txt | |
python -m unittest discover -s $GITHUB_WORKSPACE/tests -p "*.py" | |
- name: Stop and Remove Docker Containers | |
if: always() | |
run: | | |
docker compose -f docker-compose.yml down |