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

update main #94

Merged
merged 88 commits into from
Mar 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
5a00d88
Bump mypy from 1.7.0 to 1.7.1
dependabot[bot] Nov 27, 2023
6eb6140
Merge pull request #49 from danielfromearth/dependabot/pip/develop/my…
danielfromearth Nov 27, 2023
74bb291
Bump actions/setup-python from 4 to 5
dependabot[bot] Dec 11, 2023
6327230
Bump ruff from 0.1.6 to 0.1.7
dependabot[bot] Dec 11, 2023
0098b62
Merge pull request #50 from danielfromearth/dependabot/github_actions…
danielfromearth Dec 11, 2023
cc58ee6
Merge pull request #51 from danielfromearth/dependabot/pip/develop/ru…
danielfromearth Dec 11, 2023
8ccae55
Bump actions/upload-artifact from 3 to 4
dependabot[bot] Dec 18, 2023
7f595c8
Bump ruff from 0.1.7 to 0.1.8
dependabot[bot] Dec 18, 2023
71f19be
Merge pull request #52 from danielfromearth/dependabot/github_actions…
danielfromearth Dec 18, 2023
75cb32f
Merge pull request #55 from danielfromearth/dependabot/pip/develop/ru…
danielfromearth Dec 18, 2023
817d727
Bump black from 23.11.0 to 23.12.0
dependabot[bot] Dec 18, 2023
d7816c4
Merge pull request #53 from danielfromearth/dependabot/pip/develop/bl…
danielfromearth Dec 18, 2023
cdc828d
Bump coverage from 7.3.2 to 7.3.3
dependabot[bot] Dec 18, 2023
74406cd
Merge pull request #54 from danielfromearth/dependabot/pip/develop/co…
danielfromearth Dec 19, 2023
a890ece
Bump mypy from 1.7.1 to 1.8.0
dependabot[bot] Dec 25, 2023
cdae0d5
Merge pull request #57 from danielfromearth/dependabot/pip/develop/my…
danielfromearth Dec 27, 2023
dbfc8d6
Bump ruff from 0.1.8 to 0.1.9
dependabot[bot] Dec 27, 2023
f884655
Merge pull request #59 from danielfromearth/dependabot/pip/develop/ru…
danielfromearth Dec 27, 2023
dae6e72
Bump black from 23.12.0 to 23.12.1
dependabot[bot] Dec 27, 2023
e3ec780
Merge pull request #60 from danielfromearth/dependabot/pip/develop/bl…
danielfromearth Dec 27, 2023
e36812b
Bump coverage from 7.3.3 to 7.3.4
dependabot[bot] Dec 27, 2023
c1677f6
Merge pull request #58 from danielfromearth/dependabot/pip/develop/co…
danielfromearth Dec 27, 2023
91c27a8
Bump harmony-service-lib from 1.0.24 to 1.0.25
dependabot[bot] Dec 27, 2023
54b4e3e
Merge pull request #56 from danielfromearth/dependabot/pip/develop/ha…
danielfromearth Dec 27, 2023
e577c8f
Bump abatilo/actions-poetry from 2.3.0 to 2.4.0
dependabot[bot] Jan 1, 2024
49ad083
Merge pull request #61 from danielfromearth/dependabot/github_actions…
danielfromearth Jan 2, 2024
602b8d4
Bump coverage from 7.3.4 to 7.4.0
dependabot[bot] Jan 2, 2024
b8e7ef8
Merge pull request #63 from danielfromearth/dependabot/pip/develop/co…
danielfromearth Jan 2, 2024
3ea8425
Bump pytest from 7.4.3 to 7.4.4
dependabot[bot] Jan 2, 2024
23b5b12
Merge pull request #62 from danielfromearth/dependabot/pip/develop/py…
danielfromearth Jan 2, 2024
7179049
Bump ruff from 0.1.9 to 0.1.11
dependabot[bot] Jan 8, 2024
ca1832b
Merge pull request #65 from danielfromearth/dependabot/pip/develop/ru…
danielfromearth Jan 8, 2024
78466c3
Bump ruff from 0.1.11 to 0.1.13
dependabot[bot] Jan 15, 2024
32b1ed7
Bump abatilo/actions-poetry from 2.4.0 to 3.0.0
dependabot[bot] Jan 15, 2024
e92d5a4
Merge pull request #66 from danielfromearth/dependabot/pip/develop/ru…
danielfromearth Jan 16, 2024
a2c1a19
Merge pull request #67 from danielfromearth/dependabot/github_actions…
danielfromearth Jan 16, 2024
69e5a93
Bump ruff from 0.1.13 to 0.1.14
dependabot[bot] Jan 22, 2024
553551b
Merge pull request #68 from danielfromearth/dependabot/pip/develop/ru…
danielfromearth Jan 22, 2024
7f6a737
Bump black from 23.12.1 to 24.1.1
dependabot[bot] Jan 29, 2024
eca61ba
Merge pull request #69 from danielfromearth/dependabot/pip/develop/bl…
danielfromearth Jan 29, 2024
981d90e
Bump coverage from 7.4.0 to 7.4.1
dependabot[bot] Jan 29, 2024
2c4bd91
Merge pull request #70 from danielfromearth/dependabot/pip/develop/co…
danielfromearth Jan 29, 2024
5e78d01
Bump pytest from 7.4.4 to 8.0.0
dependabot[bot] Jan 29, 2024
a7f994d
Merge pull request #71 from danielfromearth/dependabot/pip/develop/py…
danielfromearth Jan 29, 2024
03d4176
Bump ruff from 0.1.14 to 0.2.0
dependabot[bot] Feb 5, 2024
b6931e8
Merge pull request #72 from danielfromearth/dependabot/pip/develop/ru…
danielfromearth Feb 5, 2024
38cc74e
Bump ruff from 0.2.0 to 0.2.1
dependabot[bot] Feb 12, 2024
6d3bf0a
Merge pull request #73 from danielfromearth/dependabot/pip/develop/ru…
danielfromearth Feb 12, 2024
74ce839
rename workflow files
danielfromearth Feb 13, 2024
244cae4
add steps to push package to container registry
danielfromearth Feb 13, 2024
3403103
Bump ruff from 0.2.1 to 0.2.2
dependabot[bot] Feb 19, 2024
4673ca8
Merge pull request #78 from danielfromearth/dependabot/pip/develop/ru…
danielfromearth Feb 19, 2024
f5e9c6e
Bump pytest from 8.0.0 to 8.0.1
dependabot[bot] Feb 19, 2024
c628615
Merge pull request #77 from danielfromearth/dependabot/pip/develop/py…
danielfromearth Feb 19, 2024
3f3de21
Bump black from 24.1.1 to 24.2.0
dependabot[bot] Feb 19, 2024
91fa19b
Merge pull request #76 from danielfromearth/dependabot/pip/develop/bl…
danielfromearth Feb 19, 2024
a236e71
Bump pytest from 8.0.1 to 8.0.2
dependabot[bot] Feb 26, 2024
99bcc9a
Merge pull request #80 from danielfromearth/dependabot/pip/develop/py…
danielfromearth Feb 26, 2024
f2a8c4f
Bump coverage from 7.4.1 to 7.4.3
dependabot[bot] Feb 26, 2024
52b9dd9
Merge pull request #79 from danielfromearth/dependabot/pip/develop/co…
danielfromearth Feb 26, 2024
679d2a6
Bump pytest from 8.0.2 to 8.1.0
dependabot[bot] Mar 4, 2024
250b3a1
Merge pull request #82 from danielfromearth/dependabot/pip/develop/py…
danielfromearth Mar 4, 2024
9f6c060
Bump ruff from 0.2.2 to 0.3.0
dependabot[bot] Mar 4, 2024
73a01f4
Merge pull request #81 from danielfromearth/dependabot/pip/develop/ru…
danielfromearth Mar 4, 2024
3ccc7cb
update CHANGELOG.md
danielfromearth Mar 4, 2024
d5e0d21
Merge pull request #75 from danielfromearth/feature/issue-74-automate…
danielfromearth Mar 4, 2024
7b40844
autoupdate pre-commit
danielfromearth Mar 6, 2024
65afb51
add badges and center the logo in README.md
danielfromearth Mar 6, 2024
4a22b03
update CHANGELOG.md
danielfromearth Mar 6, 2024
3075f3e
fix PR link in CHANGELOG.md
danielfromearth Mar 6, 2024
01ba98c
Merge pull request #84 from danielfromearth/feature/issue-83-add-read…
danielfromearth Mar 6, 2024
952493f
Bump ruff from 0.3.0 to 0.3.2
dependabot[bot] Mar 11, 2024
643c024
Bump docker/login-action from 2 to 3
dependabot[bot] Mar 11, 2024
a64db34
Merge pull request #86 from danielfromearth/dependabot/pip/develop/ru…
danielfromearth Mar 11, 2024
f40b4ac
Bump mypy from 1.8.0 to 1.9.0
dependabot[bot] Mar 11, 2024
391a124
Merge pull request #85 from danielfromearth/dependabot/pip/develop/my…
danielfromearth Mar 11, 2024
0bb96f7
Bump pytest from 8.1.0 to 8.1.1
dependabot[bot] Mar 11, 2024
d73af4d
Merge pull request #87 from danielfromearth/dependabot/pip/develop/py…
danielfromearth Mar 11, 2024
9caa812
Merge pull request #89 from danielfromearth/dependabot/github_actions…
danielfromearth Mar 11, 2024
f74138c
Bump docker/build-push-action from 3 to 5
dependabot[bot] Mar 11, 2024
087d460
Merge pull request #88 from danielfromearth/dependabot/github_actions…
danielfromearth Mar 11, 2024
4444eb7
Bump ruff from 0.3.2 to 0.3.3
dependabot[bot] Mar 18, 2024
4010ede
Merge pull request #91 from danielfromearth/dependabot/pip/develop/ru…
danielfromearth Mar 18, 2024
252a58c
Bump black from 24.2.0 to 24.3.0
dependabot[bot] Mar 18, 2024
6b5c79c
Merge pull request #92 from danielfromearth/dependabot/pip/develop/bl…
danielfromearth Mar 18, 2024
c049453
Bump coverage from 7.4.3 to 7.4.4
dependabot[bot] Mar 18, 2024
f327be5
Merge pull request #90 from danielfromearth/dependabot/pip/develop/co…
danielfromearth Mar 18, 2024
f3ab356
Merge branch 'main' into develop
danielfromearth Mar 21, 2024
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
135 changes: 0 additions & 135 deletions .github/workflows/build-pipeline.yml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ on:

jobs:
build_and_test:
uses: ./.github/workflows/reusable_run_tests.yml
uses: ./.github/workflows/run_tests.yml
195 changes: 195 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,195 @@
# When code is pushed to a branch, run linting and tests, and
# then automatically increment the version number as appropriate for the branch source.
name: Lint and Test

# Controls when the workflow will run
on:
# Triggers the workflow on push events
push:
branches: [ develop, release/**, main, feature/**, issue/**, issues/** ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

env:
POETRY_VERSION: "1.3.2"
PYTHON_VERSION: "3.10"
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
run_tests:
uses: ./.github/workflows/run_tests.yml

bump_version:
needs: run_tests
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}

- name: Install Poetry
uses: abatilo/[email protected]
with:
poetry-version: ${{ env.POETRY_VERSION }}

- name: Get version
id: get-version
run: |
echo "current_version=$(poetry version | awk '{print $2}')" >> $GITHUB_OUTPUT
echo "pyproject_name=$(poetry version | awk '{print $1}')" >> $GITHUB_ENV

- name: Bump pre-alpha version
# If triggered by push to a feature branch
if: |
${{ startsWith(github.ref, 'refs/heads/issue') }} ||
${{ startsWith(github.ref, 'refs/heads/dependabot/') }} ||
${{ startsWith(github.ref, 'refs/heads/feature/') }}
run: |
new_ver="${{ steps.get-version.outputs.current_version }}+$(git rev-parse --short ${GITHUB_SHA})"
poetry version $new_ver
echo "software_version=$(poetry version | awk '{print $2}')" >> $GITHUB_ENV

- name: Bump alpha version
# If triggered by push to the develop branch
if: ${{ github.ref == 'refs/heads/develop' }}
run: |
poetry version prerelease
echo "software_version=$(poetry version | awk '{print $2}')" >> $GITHUB_ENV
echo "venue=sit" >> $GITHUB_ENV

- name: Bump rc version
# If triggered by push to a release branch
if: ${{ startsWith(github.ref, 'refs/heads/release/') }}
env:
# True if the version already has a 'rc' pre-release identifier
BUMP_RC: ${{ contains(steps.get-version.outputs.current_version, 'rc') }}
run: |
if [ "$BUMP_RC" = true ]; then
poetry version prerelease
else
poetry version ${GITHUB_REF#refs/heads/release/}rc1
fi
echo "software_version=$(poetry version | awk '{print $2}')" >> $GITHUB_ENV
echo "venue=uat" >> $GITHUB_ENV

- name: Release version
# If triggered by push to the main branch
if: ${{ startsWith(github.ref, 'refs/heads/main') }}
env:
CURRENT_VERSION: ${{ steps.get-version.outputs.current_version }}
# True if the version already has a 'rc' pre-release identifier
BUMP_RC: ${{ contains(steps.get-version.outputs.current_version, 'rc') }}
# True if the version already has an 'alpha' pre-release identifier
BUMP_A: ${{ contains(steps.get-version.outputs.current_version, 'a') }}
# True if the version already has a 'beta' pre-release identifier
BUMP_B: ${{ contains(steps.get-version.outputs.current_version, 'b') }}
# Remove rc* from the end of version string
# The ${string%%substring} syntax below deletes the longest match of $substring from back of $string.
run: |
if [ "$BUMP_RC" = true ]; then
poetry version ${CURRENT_VERSION%%rc*}
elif [ "$BUMP_B" = true ]; then
poetry version ${CURRENT_VERSION%%b*}
elif [ "$BUMP_A" = true ]; then
poetry version ${CURRENT_VERSION%%a*}
fi
echo "software_version=$(poetry version | awk '{print $2}')" >> $GITHUB_ENV
echo "venue=ops" >> $GITHUB_ENV

- name: Log in to the Container registry
# TODO: change this and subsequent docker steps back to NOT (as follows), after testing in the feature branch --- if: ${{ !startsWith(github.ref, 'refs/heads/feature') }}
if: ${{ startsWith(github.ref, 'refs/heads/feature/') }}
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
# if: ${{ !startsWith(github.ref, 'refs/heads/feature') }}
if: ${{ startsWith(github.ref, 'refs/heads/feature/') }}
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=raw,pattern={{version}},value=${{ env.software_version }}
type=raw,value=${{ env.venue }}

# - name: Wait for package
## if: ${{ !startsWith(github.ref, 'refs/heads/feature') }}
# if: ${{ startsWith(github.ref, 'refs/heads/feature/') }}
# run: |
# pip install tenacity
# ${GITHUB_WORKSPACE}/.github/workflows/wait-for-pypi.py ${{env.pyproject_name}}[harmony]==${{ env.software_version }}

- name: Build and push Docker image
# if: ${{ !startsWith(github.ref, 'refs/heads/feature') }}
if: ${{ startsWith(github.ref, 'refs/heads/feature/') }}
id: docker-push
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile
build-args: |
SOURCE=${{env.pyproject_name}}[harmony]==${{ env.software_version }}
push: true
pull: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
#
# - name: Commit Version Bump
# # If building develop, a release branch, or main then we commit the version bump back to the repo
# if: |
# github.ref == 'refs/heads/develop' ||
# github.ref == 'refs/heads/main' ||
# startsWith(github.ref, 'refs/heads/release')
# run: |
# git config --global user.name 'batchee bot'
# git config --global user.email '[email protected]'
# git commit -am "/version ${{ env.software_version }}"
# git push
#
# - name: Push Tag
# if: |
# github.ref == 'refs/heads/develop' ||
# github.ref == 'refs/heads/main' ||
# startsWith(github.ref, 'refs/heads/release')
# run: |
# git config user.name "${GITHUB_ACTOR}"
# git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
# git tag -a "${{ env.software_version }}" -m "Version ${{ env.software_version }}"
# git push origin "${{ env.software_version }}"

# - name: Build Python Artifact
# run: |
# poetry build
#
# - uses: actions/upload-artifact@v3
# with:
# name: python-artifact
# path: dist/*
#
# - name: Publish to test.pypi.org
# id: pypi-test-publish
# if: |
# github.ref == 'refs/heads/develop' ||
# startsWith(github.ref, 'refs/heads/release')
# env:
# POETRY_PYPI_TOKEN_TESTPYPI: ${{secrets.POETRY_PYPI_TOKEN_TESTPYPI}}
# run: |
# poetry config repositories.testpypi https://test.pypi.org/legacy/
# poetry publish -r testpypi
#
# - name: Publish to pypi.org
# if: ${{ github.ref == 'refs/heads/main' }}
# id: pypi-publish
# env:
# POETRY_PYPI_TOKEN_PYPI: ${{secrets.POETRY_PYPI_TOKEN_PYPI}}
# run: |
# poetry publish
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ jobs:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Set up Poetry
uses: abatilo/actions-poetry@v2.3.0
uses: abatilo/actions-poetry@v3.0.0
with:
poetry-version: 1.3.2

Expand All @@ -43,14 +43,14 @@ jobs:

- name: Archive code coverage report (xml)
if: ${{ always() }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: code coverage report (xml)
path: build/reports/coverage.xml

- name: Archive code coverage report (HTML)
if: ${{ always() }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: code coverage report (HTML)
path: build/reports/coverage.html
Loading