-
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
7 changed files
with
75 additions
and
3 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 @@ | ||
{ | ||
"name": "Docker Push", | ||
"description": "To build and push a new docker image to dockerhub", | ||
"iconName": "docker-logo", | ||
"filePatterns": [ | ||
"^Dockerfile" | ||
] | ||
} |
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,24 @@ | ||
name: Build and push docker images | ||
|
||
on: | ||
push: | ||
branches: | ||
- [ $default-branch ] | ||
|
||
jobs: | ||
build-and-push: | ||
name: Build image and push to Docker Hub | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
name: Checkout source code | ||
- name: Build the Docker image | ||
run: | | ||
docker build . --tag synbiohub/{image_name}:snapshot | ||
- uses: azure/docker-login@v1 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
- name: Push the image to Docker Hub | ||
run: | | ||
docker push synbiohub/{image_name}:snapshot |
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,8 +1,11 @@ | ||
{ | ||
"name": "Python Linting", | ||
"description": "Flake8 linting on pull request", | ||
"iconName": "python-snake", | ||
"name": "Python Testing", | ||
"description": "Run pytest tests found in the package/tests folder", | ||
"iconName": "python-logo", | ||
"categories": [ | ||
"Python" | ||
], | ||
"filePatterns": [ | ||
"requirements.txt" | ||
] | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 @@ | ||
{ | ||
"name": "Python Linting", | ||
"description": "Flake8 linting on pull request", | ||
"iconName": "python-logo", | ||
"categories": [ | ||
"Python" | ||
] | ||
} |
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,27 @@ | ||
name: Shell Scripts Unit Testing | ||
|
||
on: | ||
pull_request: | ||
branches: [ $default-branch ] | ||
|
||
jobs: | ||
testing_job: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python 3.9.5 | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: 3.9.5 | ||
- name: Install Python dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install -r requirements.txt | ||
- name: Install Pytest dependencies | ||
run: | | ||
python -m pip install pytest | ||
python -m pip install -e {package_name} | ||
- name: Test with pytest | ||
run: | | ||
cd ./{package_name} #this may be needed if the package/package/test structure is used | ||
python -m pytest -vv -s |