-
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.
Merge pull request #1 from FelipeMezzarana/Add-CI/DC-Pipeline
Add Github Actions workflow
- Loading branch information
Showing
45 changed files
with
2,154 additions
and
552 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,36 @@ | ||
name: run-unit-integration-tests-and-check-style | ||
|
||
on: | ||
workflow_call: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
contents: write | ||
|
||
steps: | ||
- name: checkout-code | ||
uses: actions/checkout@v4 | ||
|
||
- name: build-linter-image | ||
run: docker build -f Dockerfile.linting -t app-tox-worker . | ||
|
||
- name: check-linting-tests | ||
run: docker run app-tox-worker tox | ||
|
||
- name: build-unit-test-image | ||
run: docker build --file Dockerfile.unit_tests --tag app_unit_tests . | ||
|
||
- name: run-unit-tests | ||
run: docker run --network=host --volume="$PWD/coverage/":/var/coverage/ app_unit_tests | ||
|
||
- name: build-integration-test-image | ||
run: docker build --file Dockerfile.integration_tests --tag app_integration_tests . | ||
|
||
- name: run-integration-tests | ||
run: docker run app_integration_tests |
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,4 @@ | ||
.ipynb_checkpoints | ||
*.pyc | ||
.DS_Store | ||
.vscode/launch.json |
Binary file not shown.
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,10 @@ | ||
FROM python:3.10 | ||
|
||
COPY requirements.txt requirements.txt | ||
RUN pip install -r requirements.txt | ||
|
||
# Copy everything in | ||
COPY src /src | ||
WORKDIR / | ||
|
||
CMD python3 -m src.main |
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,12 @@ | ||
FROM python:3.10 | ||
|
||
# Install requirements | ||
COPY requirements.txt requirements.txt | ||
RUN pip install -r requirements.txt | ||
|
||
# Copy everything in | ||
COPY . /repository | ||
WORKDIR /repository | ||
|
||
# Run unit tests by default | ||
CMD ["python3", "-m", "pytest", "-s", "tests/integration"] |
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,8 @@ | ||
FROM python:3.11 | ||
|
||
RUN pip install tox | ||
|
||
COPY . /repository | ||
WORKDIR /repository | ||
|
||
CMD tox |
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,12 @@ | ||
FROM python:3.10 | ||
|
||
# Install requirements | ||
COPY requirements.txt requirements.txt | ||
RUN pip install -r requirements.txt | ||
|
||
# Copy everything in | ||
COPY . /repository | ||
WORKDIR /repository | ||
|
||
# Run unit tests by default | ||
CMD ["python3", "-m", "pytest", "tests/unit", "--cov", "src", "--cov-config", "tox.ini", "--cov-report", "html", "--cov-report", "term"] |
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 was deleted.
Oops, something went wrong.
Oops, something went wrong.