-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TEST TESTS VIA DOCKER
- Loading branch information
Showing
6 changed files
with
60 additions
and
71 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,32 +1,20 @@ | ||
--- | ||
name: Docker build | ||
name: Docker build and tests | ||
on: | ||
push: | ||
branches: | ||
- main | ||
env: | ||
DOCKER_IMAGE_NAME: parseltongist/bank_app | ||
DOCKERFILE_DIRECTORY: ./ | ||
jobs: | ||
build: | ||
build-and-run-tests: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Build Docker Image | ||
run: | | ||
docker build -t $DOCKER_IMAGE_NAME:latest . | ||
working-directory: ${{ env.DOCKERFILE_DIRECTORY }} | ||
- name: Log in to Docker Hub | ||
if: success() | ||
run: | | ||
echo ${{ secrets.DOCKER_PASSWORD }} | | ||
docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin | ||
env: | ||
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | ||
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | ||
- name: Push Docker image to the Docker Hub | ||
if: success() | ||
run: | | ||
docker push $DOCKER_IMAGE_NAME:latest | ||
docker build -t test-tag . | ||
working-directory: ${{ env.DOCKERFILE_DIRECTORY }} | ||
- name: TEST VIA DOCKER | ||
run: docker run test-tag |
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,26 +1,26 @@ | ||
name: pre-commit | ||
on: | ||
pull_request: | ||
push: | ||
env: | ||
DOCKER_IMAGE_NAME: parseltongist/bank_app | ||
DOCKERFILE_DIRECTORY: ./ | ||
jobs: | ||
pre-commit: | ||
name: pre-commit | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.11 | ||
- uses: pre-commit/[email protected] | ||
docker-build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Build Docker Image | ||
run: | | ||
docker build -t $DOCKER_IMAGE_NAME:latest . | ||
working-directory: ${{ env.DOCKERFILE_DIRECTORY }} | ||
#name: pre-commit | ||
#on: | ||
# pull_request: | ||
# push: | ||
#env: | ||
# DOCKER_IMAGE_NAME: parseltongist/bank_app | ||
# DOCKERFILE_DIRECTORY: ./ | ||
#jobs: | ||
# pre-commit: | ||
# name: pre-commit | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - uses: actions/checkout@v4 | ||
# - uses: actions/setup-python@v5 | ||
# with: | ||
# python-version: 3.11 | ||
# - uses: pre-commit/[email protected] | ||
# docker-build: | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - name: Checkout code | ||
# uses: actions/checkout@v4 | ||
# - name: Build Docker Image | ||
# run: | | ||
# docker build -t $DOCKER_IMAGE_NAME:latest . | ||
# working-directory: ${{ env.DOCKERFILE_DIRECTORY }} |
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,23 @@ | ||
#--- | ||
#name: Run unit tests | ||
#on: | ||
# push: | ||
# branches: | ||
# - "*" | ||
# pull_request: | ||
# branches: | ||
# - "*" | ||
#jobs: | ||
# build: | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - name: Set up Python 3.11 | ||
# uses: actions/setup-python@v5 | ||
# with: | ||
# python-version: 3.11 | ||
# - name: Checkout code | ||
# uses: actions/checkout@v4 | ||
# - name: Install dependencies | ||
# run: pip install -r requirements.txt | ||
# - name: Run tests | ||
# run: python -m unittest discover |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
SQLAlchemy==2.0.20 | ||
tabulate==0.9.0 | ||
sqlalchemy |