Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PR-493 - merge #91

Open
wants to merge 29 commits into
base: release
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
0424ddc
Fix typo in people.html
epicfaace Feb 13, 2023
31df5d9
Update rel-pr-open.yml
kvchitrapu Feb 14, 2023
2e264e1
Fix typo in installation.rst (start-docker -> docker-start)
shreevatsa Feb 14, 2023
b74e8c8
Bump docker/build-push-action from 3.2.0 to 4.0.0 (#445)
dependabot[bot] Feb 15, 2023
52d970a
Add Docker setup for pushing to release branch
kvchitrapu Feb 16, 2023
10cf5fd
[proofing] Add partial work for search+replace
kvchitrapu Feb 22, 2023
ab55dbe
Add validators for username, password, and email
kvchitrapu Mar 1, 2023
515b046
[proofing] add search and replace
kvchitrapu Mar 24, 2023
c8b4e74
Revise onboarding process
akprasad Mar 30, 2023
19c09e6
[admin] Add pagination
akprasad Apr 1, 2023
d9f32ae
Switch to Ruff for Python linting
akprasad Apr 1, 2023
04e7062
Bump typescript from 4.8.2 to 5.0.2
dependabot[bot] Apr 1, 2023
aa59e43
[admin] Add various tweaks to admin interface
akprasad Apr 1, 2023
09f3712
Increase test coverage to 82%
akprasad Apr 1, 2023
10d7f7a
[proofing] Tweak sidebar and tab UI
akprasad Apr 2, 2023
b0c479f
[proofing] Partially clean up search/replace UX
akprasad Apr 2, 2023
5c83907
Update Babel package
kvchitrapu Apr 2, 2023
9d2bfda
Remove various transitive deps
akprasad Apr 2, 2023
c2054d8
Clean up implicit deps
akprasad Apr 2, 2023
29f1e89
readd pytest-cov
akprasad Apr 2, 2023
db4139d
Upgrade poetry version
akprasad Apr 2, 2023
fbefd60
Update to 1.4.1 everywhere
akprasad Apr 2, 2023
2eec0b7
Remove more
akprasad Apr 2, 2023
f98d457
remove requirements.txt
kvchitrapu Apr 2, 2023
4d5cf9b
removed requirements.txt
kvchitrapu Apr 2, 2023
24862e1
use poetry
kvchitrapu Apr 2, 2023
113501c
use poetry
kvchitrapu Apr 2, 2023
a6db174
first install poetry binary before python setup
kvchitrapu Apr 2, 2023
324064e
first install poetry binary before python setup in py-tests
kvchitrapu Apr 2, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 31 additions & 10 deletions .github/workflows/basic-tests.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: 'Basic (Unit) Tests'
# Install python and node. Run lint and unit tests.

# **What it does**: Setups up python dependencies and runs tests.
name: 'Basic (Unit) Tests'
# **Why we have it**: Automatically run tests to ensure code doesn't introduce regressions.
# **Who does it impact**: Python small-scale "unit" tests.

Expand All @@ -22,13 +22,25 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install Poetry
run: |
python -m pip install poetry==1.4.1

- name: Install Python3
uses: actions/setup-python@v4
with:
python-version: '3.9.x'
cache: 'pip'
cache-dependency-path: requirements.txt
python-version: '3.10.x'
cache: 'poetry'

- name: Install dependencies and cache
uses: actions/cache@v2
with:
path: ~/.cache/pypoetry
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }}

- name: Install dependencies
run: make install-python

- uses: actions/setup-node@v3
with:
Expand All @@ -37,7 +49,6 @@ jobs:

- name: Install dependencies
run: |
make install-python
npm ci

- name: Lint
Expand All @@ -56,20 +67,30 @@ jobs:
- name: Checkout
uses: actions/checkout@v3

- name: Install Poetry
run: |
python -m pip install poetry==1.4.1

- name: Install Python3
uses: actions/setup-python@v4
with:
python-version: '3.9.x'
cache: 'pip'
python-version: '3.10.x'
cache: 'poetry'

- name: Install dependencies and cache
uses: actions/cache@v2
with:
path: ~/.cache/pypoetry
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }}

- name: Install dependencies
run: python3 -m pip install -r requirements.txt
run: make install-python

- name: Run Tests
run: make coverage

- name: Check coverage
run: coverage report --fail-under=80
run: make coverage-report

run-js-tests:
runs-on: ubuntu-22.04
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/external-pr-open.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Ambuda workflow to build and publish docker image

name: Build and test incoming

name: Basic image build and test
env:
AMBUDA_VERSION: v0.1
AMBUDA_HOST_IP: 127.0.0.1
Expand All @@ -19,7 +18,6 @@ jobs:
build_and_test:
name: Build external pr image
runs-on: ubuntu-22.04
environment: staging
permissions:
packages: write
contents: read
Expand All @@ -38,7 +36,7 @@ jobs:

- name: Build and Test docker image
id: build-to-test
uses: docker/build-push-action@v3.2.0
uses: docker/build-push-action@v4.0.0
with:
context: .
file: build/containers/Dockerfile.final
Expand Down
17 changes: 8 additions & 9 deletions .github/workflows/rel-pr-create.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
# Ambuda workflow to build and publish docker image

name: Create Release PR on seeing new code
# Check for changes in "main". Push changes to "releases".

name: Push changes from main to releases
env:
GH_TOKEN: ${{ github.token }}

# head/branch where current changes reside befor merge
PR_SOURCE_BRANCH: development
PR_SOURCE_BRANCH: main
# base - branch intended to change once the proposed changes are meged.
PR_TARGET_BRANCH: releases
PR_TARGET_BRANCH: release

on:
workflow_dispatch:
Expand All @@ -28,16 +27,16 @@ jobs:
- uses: actions/checkout@v3
with:
ref: ${{ env.PR_TARGET_BRANCH }}
- name: Find the recent PR merge on development
- name: Find the recent PR merge on ${{ env.PR_SOURCE_BRANCH }}
id: find_pr
run: |
LAST_RUNTIME=$(date +'%Y-%m-%dT%H:%M:%S' --date '-30000 min')
LAST_RUNTIME=$(date +'%Y-%m-%dT%H:%M:%S' --date '-1800 min')
gh repo set-default ambuda-org/ambuda
echo "PR_NUMBER=$(gh pr list --state merged --base ${{ env.PR_SOURCE_BRANCH }} --search "merged:>$LAST_RUNTIME" -L 1 --json number| jq '.[].number')" >> $GITHUB_OUTPUT

create_pr:
runs-on: ubuntu-22.04
name: Create PR on releases branch
name: Create PR on release branch
environment: staging
permissions:
packages: write
Expand All @@ -61,4 +60,4 @@ jobs:
base: ${{ env.PR_TARGET_BRANCH }}
branch: ${{ env.PR_TARGET_BRANCH }}-${{ env.PR_NUMBER }}
title: PR-${{ env.PR_NUMBER }} - merge
body: development/PR-${{ env.PR_NUMBER }} merge is open
body: ${{ env.PR_SOURCE_BRANCH }}/PR-${{ env.PR_NUMBER }} merge is open
7 changes: 3 additions & 4 deletions .github/workflows/rel-pr-merged.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Ambuda workflow to build and publish docker image

name: Teardown staging
# Cleanup staging. Usually occurs after a pr is merged or closed.

name: Teardown staging deployment
env:
AMBUDA_VERSION: v0.1

Expand All @@ -13,7 +12,7 @@ on:
# - 'v*'
pull_request:
branches:
- 'releases'
- 'release'
types:
- closed

Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/rel-pr-open.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
# Ambuda workflow to build and publish docker image

name: Build publish and staging
# Build release image. Push image to ghcr.io. Deploy on staging environment.

name: Release image build & publish
env:
AMBUDA_VERSION: v0.1
AMBUDA_HOST_IP: 127.0.0.1
AMBUDA_HOST_PORT: 5090
REGISTRY: ghcr.io

on:
workflow_dispatch:
pull_request:
branches:
- 'releases'
- 'release'
types: [opened, reopened, synchronize]

jobs:
Expand Down Expand Up @@ -60,7 +60,7 @@ jobs:

- name: Build and push Docker images
id: publish
uses: docker/build-push-action@v3.2.0
uses: docker/build-push-action@v4.0.0
with:
context: .
file: build/containers/Dockerfile.final
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Large data files, including texts, parse data, and (in local dev)
# image uploads.
data/
deploy/data_database
deploy/data_files

# Autogenerated files (compiled CSS, testing, documentation, ...)
.coverage
Expand Down
Loading