-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
84 additions
and
23 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: Container collection check | ||
|
||
on: | ||
push: | ||
paths: | ||
- 'env_file' | ||
- 'Dockerfile' | ||
- 'docker-compose.yml' | ||
- 'src/**' | ||
workflow_run: | ||
workflows: [ PEP8 Style Guide Enforcement & Requirements check ] | ||
types: [ completed ] | ||
|
||
jobs: | ||
docker_check: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Create .env | ||
env: | ||
TELEGRAM_TOKEN: ${{ secrets.TEST_BOT_TOKEN }} | ||
run: | | ||
cp env_file .env | ||
sed -i -e "s/PasteYourTelegramToken/${TELEGRAM_TOKEN}/g" .env | ||
- name: Build images | ||
run: | | ||
docker compose build | ||
- name: Pull images | ||
run: | | ||
docker compose pull --ignore-buildable | ||
- name: Start containers | ||
run: | | ||
docker compose up -d | ||
sleep 30 | ||
- name: Check containers | ||
run: | | ||
echo "Running containers <$(docker ps -a --filter "status=running" --format "{{.ID}}" | wc -l)> of $(docker ps -a --format "{{.ID}}" | wc -l)." | ||
docker ps -a --filter "status=running" --format "{{.ID}}\t{{.Names}}" | ||
if [[ "$(docker ps -a --filter "status=running" --format "{{.ID}}" | wc -l)" -eq "$(docker ps -a --format "{{.ID}}" | wc -l)" ]]; then | ||
echo -e "\nCHECK COMPLETE" | ||
exit 0 | ||
else | ||
echo -e "\nCHECK FAILED" | ||
exit 1 | ||
fi |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,32 @@ | ||
name: PEP8 Style Guide Enforcement \ Requirements check | ||
name: PEP8 Style Guide Enforcement & Requirements check | ||
|
||
on: [push] | ||
|
||
jobs: | ||
build: | ||
base_check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python 3.10 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: "3.10" | ||
- name: Installation of testing utilities (Pipreqs, Pylint) | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install pipreqs pylint | ||
- name: Dependency check (Run Pipreqs) | ||
run: | | ||
pipreqs --savepath src/reqs-check.txt --mode no-pin src/ | ||
python requirements_check.py src/requirements.txt src/reqs-check.txt | ||
- name: Install Dependencies | ||
run: | | ||
pip install -r src/requirements.txt | ||
- name: Style check (Run Pylint) | ||
run: | | ||
pylint $(git ls-files 'src/*.py') | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Python 3.10 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: "3.10" | ||
|
||
- name: Installation of testing utilities (Pipreqs, Pylint) | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install pipreqs pylint | ||
- name: Dependency check (Run Pipreqs) | ||
run: | | ||
pipreqs --savepath src/reqs-check.txt --mode no-pin src/ | ||
python requirements_check.py src/requirements.txt src/reqs-check.txt | ||
- name: Install Dependencies | ||
run: | | ||
pip install -r src/requirements.txt | ||
- name: Style check (Run Pylint) | ||
run: | | ||
pylint $(git ls-files 'src/*.py') |
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
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
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