-
Notifications
You must be signed in to change notification settings - Fork 8
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 #58 from nucypher/development
TACo Porter 🌮
- Loading branch information
Showing
54 changed files
with
7,189 additions
and
4,588 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
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,25 @@ | ||
**Type of PR:** | ||
- [ ] Bugfix | ||
- [ ] Feature | ||
- [ ] Documentation | ||
- [ ] Other | ||
|
||
**Required reviews:** | ||
- [ ] 1 | ||
- [ ] 2 | ||
- [X] 3 | ||
|
||
**What this does:** | ||
> High-level idea of the changes introduced in this PR. | ||
> List relevant API changes (if any), as well as related PRs and issues. | ||
**Issues fixed/closed:** | ||
> - Fixes #... | ||
**Why it's needed:** | ||
> Explain how this PR fits in the greater context of the NuCypher Network. | ||
> E.g., if this PR addresses a `nucypher/productdev` issue, let reviewers know! | ||
**Notes for reviewers:** | ||
> What should reviewers focus on? | ||
> Is there a particular commit/function/section of your PR that requires more attention from reviewers? |
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,17 @@ | ||
name: 🧹 Darker | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.9' | ||
- uses: akaihola/[email protected] | ||
with: | ||
version: "1.7.2" # defaults to same version, but can be modified |
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,33 @@ | ||
name: Build and Push Docker Image (version tags) | ||
|
||
on: | ||
push: | ||
tags: [ 'v*.*.*' ] | ||
|
||
jobs: | ||
docker: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- name: Echo Tag Name | ||
run: echo "Tag - ${{github.ref_name}}" | ||
|
||
- name: Build and push Docker image | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: ${{ github.workspace }} | ||
file: ./deploy/docker/Dockerfile | ||
push: true | ||
tags: nucypher/porter:${{github.ref_name}} |
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,25 @@ | ||
name: 🧹 Lint with Ruff | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
ruff-lint: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.9" | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install ruff | ||
pip install . | ||
- name: Lint with Ruff | ||
run: ruff --output-format=github porter |
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 |
---|---|---|
|
@@ -12,31 +12,46 @@ jobs: | |
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.8", "3.9", "3.10"] | ||
python-version: ["3.9", "3.11"] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install -e .[dev] | ||
python -m pip install -r dev-requirements.txt | ||
python scripts/install_solc.py | ||
- id: python_cache | ||
name: Retrieve Cached Python Dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: ${{ env.pythonLocation }} | ||
key: ${{ runner.os }}-pip-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('dev-requirements.txt', 'requirements.txt') }} | ||
|
||
- name: Upgrade pip | ||
if: steps.python_cache.outputs.cache-hit != 'true' | ||
run: python -m pip install --upgrade pip | ||
|
||
- name: Install dependencies (incl. updated code) | ||
run: pip install .[dev] | ||
|
||
- name: Run tests | ||
if: matrix.python-version != '3.9' | ||
run: | | ||
python -m pytest tests | ||
- name: Run tests (Coverage) | ||
if: matrix.python-version == '3.9' | ||
run: | | ||
coverage run --data-file=test_data -m pytest tests | ||
coverage xml -i --data-file=test_data -o coverage.xml | ||
- name: Upload test coverage to Codecov | ||
if: matrix.python-version == '3.8' | ||
if: matrix.python-version == '3.9' | ||
uses: codecov/[email protected] | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
fail_ci_if_error: true | ||
verbose: true | ||
files: coverage.xml |
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
Oops, something went wrong.