-
Notifications
You must be signed in to change notification settings - Fork 3
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 #4 from Ahelsamahy/GH-tests
GitHub actions
- Loading branch information
Showing
7 changed files
with
112 additions
and
76 deletions.
There are no files selected for viewing
File renamed without changes.
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 |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: Docker Compose Test | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- '*' | ||
|
||
jobs: | ||
Test_Nano_Docker: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v2 | ||
# Exculding inference because it needs .oonx and .ini files, which are private | ||
# Add docker-compose.override.yml to overcome CPU higher than 1 in pilot service | ||
- name: Docker compose build (root without inference) | ||
run: docker-compose -f docker-compose.yml -f docker-compose.override.yml build $(docker-compose -f docker-compose.yml -f docker-compose.override.yml config --services | grep -v inference) | ||
|
||
# Make sure it would run good for at least 30 seconds | ||
- name: Docker compose up (root without inference) | ||
run: | | ||
docker-compose -f docker-compose.yml -f docker-compose.override.yml up -d $(docker-compose -f docker-compose.yml -f docker-compose.override.yml config --services | grep -v inference) | ||
sleep 30 | ||
docker-compose -f docker-compose.yml -f docker-compose.override.yml down | ||
|
||
Test_Pi_Docker: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v2 | ||
# Build the Docker services: This validates the build process and catches issues related to the Dockerfile and dependencies. | ||
- name: Docker compose build (raspi) | ||
run: docker-compose -f raspi/docker-compose.yml build | ||
|
||
# Run (up): Ensures that the application behaves correctly in a containerized environment. | ||
- name: Docker compose up (raspi) | ||
run: | | ||
docker-compose -f raspi/docker-compose.yml up -d | ||
sleep 30 | ||
docker-compose -f raspi/docker-compose.yml down |
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,34 @@ | ||
name: Python CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- '*' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: [3.8, 3.9] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install black | ||
- name: Check code formatting with Black on changed files | ||
run: | | ||
FILES=$(git diff --name-only ${{ github.event.before }} ${{ github.sha }} | grep '\.py$' | xargs) | ||
if [ ! -z "$FILES" ]; then | ||
# Check the formatting of those files with black | ||
black --check $FILES | ||
else | ||
echo "No Python files have changed." | ||
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
version: '3' # or whatever version you're using | ||
|
||
services: | ||
pilot: | ||
cpuset: '' # Clearing the CPU set constraint for testing |
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.