Skip to content

Commit

Permalink
chore(release): Release v.3.0.0 [TSD-1529] (#25)
Browse files Browse the repository at this point in the history
* feat: First pass at tagging automation

* feat: Added poetry install [TSD-1125]

* fix: Add ignore for advisory 52983 (#22)

* fix: Add temporary ignore for advisories 53310 and 53332

* feat!: Update poetry version

* fix: Update GHA repo refs

* feat: Try running build in AL2 container

* feat: Use aws sam build image

* feat: Switch back to amazonlinux

* fix: Add another missing dependency

* feat: Add one more dep

* skip caching for now

* skip python setup step as well

* fix: Install python when running tests

* test

* Add pip install

* feat: Switch to aws lambda 3.8 runtime container

* fix: Bade work dir maybe?

* feat: Add debug step

* fix: Try removing work dir specification

* fix: Add missing checkout step

* Revert "fix: Try removing work dir specification"

This reverts commit 6decf99.

* fix: Add install of tar and gzip

* feat: Broke python dep install into multiple actions

* fix: Remove bad input passing

* fix: More bad arg passing

* fix: Added npm install step

* fix: Correct commands to install npm

* feat: Now using openapi-python-client 0.13.2 by default (#23)

* feat!: Entire predeploy script can now be specified [TSD-1528]

* feat: Update default poetry version and resolve serverless build errors (#24)

* fix: Post merge issue [TSD-1528]

* feat: V3 all the things! (including GH-provided actions/* actions)

* fix: Updated to latest versions of things

* fix: Using correct version pins, using poetry install action

* fix: Bump setup-python action to 4.x

* fix: Added step to correct prerelease version formatting [TSD-1529]

* feat: Added PAT passing to allow auto-tags to kickoff builds

* fix: Bad setup-node version

* test: Run GHA in native runner

* fix: Switch to normal python setup action

* feat: Re-add manual generation of requirements.txt

* fix: Removed some commented out code

* fix: Exclude dev dependencies for serverless deploy

* feat: Add python version inputs to all relevant workflows [TSD-1687] (#26)

* feat: Enforce python project coverage [TSD-1611] (#27)

* feat: Added python version inputs/passing to all relevant workflows and actions [TSD-1687]

* feat: Added enforcement of 100% code coverage [TSD-1611]

* fix: Add input type

* feat: Add input type [TSD-1611]

* fix: Change run check action pin [TSD-1611]

* fix: Add shell [TSD-1611]

* fix: Check skip option as string [TSD-1611]

* fix: Correct error in skip logic [TSD-1611]

* chore: Switch branch refs in prep for PR [TSD-1611]

---------

Co-authored-by: Ethan Mann <ethanmann@TRIAX-EMann-MacBookPro.local>

---------

Co-authored-by: Ben S <ben@brsweet.com>
Co-authored-by: Ethan Mann <ethanmann@TRIAX-EMann-MacBookPro.local>
  • Loading branch information
3 people committed Jul 10, 2023
1 parent e4d6f44 commit 9147234
Show file tree
Hide file tree
Showing 21 changed files with 309 additions and 75 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/node-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Setup Node and Install Dependencies
uses: triaxtec/github-actions/node/setup-node-and-install-dependencies-with-authenticated-registry@v2
uses: triaxtec/github-actions/node/setup-node-and-install-dependencies-with-authenticated-registry@v3
with:
node-version: ${{ inputs.node-version }}
npm-registry-url: ${{ secrets.npm-registry-url }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/node-run-checks-and-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Setup Node and Install Dependencies
uses: triaxtec/github-actions/node/setup-node-and-install-dependencies-with-authenticated-registry@v2
uses: triaxtec/github-actions/node/setup-node-and-install-dependencies-with-authenticated-registry@v3
with:
node-version: ${{ inputs.node-version }}
npm-registry-url: ${{ secrets.npm-registry-url }}
Expand Down
44 changes: 44 additions & 0 deletions .github/workflows/python-bump-version-and-tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Bump Version and Tag

on:
workflow_call:
inputs:
python-version:
description: The version of python to install/use
type: string
required: false
default: "3.8"
secrets:
GH_TOKEN:
required: true

jobs:
bump-version-and-commit:
name: Bump Project Version, Commit, and Tag
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3
with:
token: ${{ secrets.GH_TOKEN }}

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

- name: Install and Configure Poetry
uses: triaxtec/github-actions/python/install-and-configure-poetry@v3
with:
poetry-version: 1.4.1
working-directory: ${{inputs.working-directory}}

- name: Bump Project Version
id: bump-version
uses: triaxtec/github-actions/python/bump-project-version@v3

- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "chore: Bump version to v.${{ steps.bump-version.outputs.new-project-version }}"
tagging_message: v.${{ steps.bump-version.outputs.new-project-version }}
28 changes: 19 additions & 9 deletions .github/workflows/python-deploy-serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
environment:
required: true
type: string
cli-name:
predeploy-script:
required: false
type: string
working-directory:
Expand All @@ -26,6 +26,11 @@ on:
type: string
required: false
default: "us-east-1"
python-version:
description: The version of python to install/use
type: string
required: false
default: "3.8"
secrets:
private-package-repo-username:
required: false
Expand All @@ -39,30 +44,35 @@ on:
jobs:
build-and-deploy:
name: Deploy to ${{ inputs.environment }}

runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Setup Python and Poetry and Install Dependencies
uses: triaxtec/github-actions/python/setup-python-and-poetry-and-install-dependencies@v2
- name: Setup python and poetry and install dependencies
uses: triaxtec/github-actions/python/setup-python-and-poetry-and-install-dependencies@v3
with:
working-directory: ${{ inputs.working-directory }}
python-version: ${{ inputs.python-version }}
private-package-repo-url: ${{ inputs.private-package-repo-url }}
private-package-repo-username: ${{ secrets.private-package-repo-username }}
private-package-repo-password: ${{ secrets.private-package-repo-password }}
working-directory: ${{ inputs.working-directory }}
dependency-hash-version: ${{ inputs.dependency-hash-version }}
exclude-dev-dependencies: true

- name: Build Code
- name: Run Predeploy Script
working-directory: ${{ inputs.working-directory }}
if: ${{ inputs.cli-name != '' }}
run: poetry run ${{ inputs.cli-name }} build
if: ${{ inputs.predeploy-script != '' }}
run: ${{ inputs.predeploy-script }}

- name: Generate Requirements
working-directory: ${{ inputs.working-directory }}
run: poetry export -f requirements.txt -o requirements.txt --with-credentials --without-hashes

- name: Serverless Deploy to ${{ inputs.environment }}
uses: triaxtec/github-actions/generic/serverless-deploy@v2
uses: triaxtec/github-actions/generic/serverless-deploy@v3
with:
environment: ${{ inputs.environment }}
aws-default-region: ${{ inputs.aws-default-region }}
Expand Down
17 changes: 12 additions & 5 deletions .github/workflows/python-generate-and-publish-client-libraries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,17 @@ on:
description: The version of openapi-python-client to use to build the python client library
type: string
required: false
default: "0.11.1"
default: "0.13.2"
angular-generator-version:
description: The version of OpenAPITools Generator to use to build the angular client library
type: string
required: false
default: "5.1.1"
python-version:
description: The version of python to install/use
type: string
required: false
default: "3.8"
secrets:
private-package-repo-username:
required: false
Expand All @@ -49,8 +54,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Generate OpenAPI Document
uses: triaxtec/github-actions/python/generate-openapi-doc@v2
uses: triaxtec/github-actions/python/generate-openapi-doc@v3
with:
python-version: ${{ inputs.python-version }}
private-package-repo-url: ${{ inputs.private-package-repo-url }}
private-package-repo-username: ${{ secrets.private-package-repo-username }}
cli-name: ${{ inputs.cli-name }}
Expand All @@ -59,7 +65,7 @@ jobs:
run: pipx run --spec openapi-python-client==${{ inputs.python-generator-version }} openapi-python-client generate --config python-generator-config.yml --path openapi.json

- name: Publish Python Client
uses: triaxtec/github-actions/python/publish-package@v2
uses: triaxtec/github-actions/python/publish-package@v3
with:
token: ${{ secrets.private-package-repo-push-token }}
private-package-repo-url: ${{ inputs.private-package-repo-url }}
Expand All @@ -70,14 +76,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Generate OpenAPI Document
uses: triaxtec/github-actions/python/generate-openapi-doc@v2
uses: triaxtec/github-actions/python/generate-openapi-doc@v3
with:
python-version: ${{ inputs.python-version }}
private-package-repo-url: ${{ inputs.private-package-repo-url }}
private-package-repo-username: ${{ secrets.private-package-repo-username }}
cli-name: ${{ inputs.cli-name }}

- name: Set up Node
uses: actions/setup-node@v2.1.4
uses: actions/setup-node@v3
with:
node-version: '14'

Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/python-publish-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ on:
type: string
required: false
default: "."
python-version:
description: The version of python to install/use
type: string
required: false
default: "3.8"
secrets:
private-package-repo-username:
required: false
Expand All @@ -33,19 +38,20 @@ jobs:
name: Publish Package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Setup Python and Poetry and Install Dependencies
uses: triaxtec/github-actions/python/setup-python-and-poetry-and-install-dependencies@v2
uses: triaxtec/github-actions/python/setup-python-and-poetry-and-install-dependencies@v3
with:
python-version: ${{ inputs.python-version }}
private-package-repo-url: ${{ inputs.private-package-repo-url }}
private-package-repo-username: ${{ secrets.private-package-repo-username }}
dependency-hash-version: ${{ inputs.dependency-hash-version }}
exclude-dev-dependencies: true
extras: ${{ inputs.extras }}

- name: Build and Publish
uses: triaxtec/github-actions/python/publish-package@v2
uses: triaxtec/github-actions/python/publish-package@v3
with:
private-package-repo-url: ${{ inputs.private-package-repo-url }}
token: ${{ secrets.private-package-repo-push-token }}
Expand Down
19 changes: 16 additions & 3 deletions .github/workflows/python-run-checks-and-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,17 @@ on:
type: string
required: false
default: "."
python-version:
description: The version of python to install/use
type: string
required: false
default: "3.8"
skip-coverage-check:
description: Set to true to disable enforcement of 100% code coverage.
type: boolean
required: false
default: false

secrets:
private-package-repo-username:
required: false
Expand All @@ -51,15 +62,16 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Start Services
if: inputs.start-services-with-docker-compose
run: docker-compose up -d

- name: Setup python and poetry and install dependencies
uses: triaxtec/github-actions/python/setup-python-and-poetry-and-install-dependencies@v2
uses: triaxtec/github-actions/python/setup-python-and-poetry-and-install-dependencies@v3
with:
python-version: ${{ inputs.python-version }}
private-package-repo-url: ${{ inputs.private-package-repo-url }}
private-package-repo-username: ${{ secrets.private-package-repo-username }}
private-package-repo-password: ${{ secrets.private-package-repo-password }}
Expand All @@ -72,10 +84,11 @@ jobs:
run: ${{ inputs.custom-pre-checks-script }}

- name: Run Checks and Tests
uses: triaxtec/github-actions/python/run-checks@v2
uses: triaxtec/github-actions/python/run-checks@v3
with:
module: ${{ inputs.module }}
additional-modules-to-lint: ${{ inputs.additional-modules-to-lint }}
skip-coverage-check: ${{ inputs.skip-coverage-check }}
env:
AWS_DEFAULT_REGION: us-east-1

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/rust-build-and-upload-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Add SSH key so cargo can access private repos
uses: webfactory/ssh-agent@v0.5.3
with:
ssh-private-key: ${{ secrets.ssh-private-key }}

- name: Setup Rust and Install Dependencies
uses: triaxtec/github-actions/rust/setup@v2
uses: triaxtec/github-actions/rust/setup@v3

- name: Build and Upload
uses: triaxtec/github-actions/rust/build-and-upload@v2
uses: triaxtec/github-actions/rust/build-and-upload@v3
with:
binary_name: eat
8 changes: 4 additions & 4 deletions .github/workflows/rust-run-checks-and-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,20 +39,20 @@ jobs:
ssh-private-key: ${{ secrets.ssh-private-key }}

- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Setup Rust and Install Dependencies
uses: triaxtec/github-actions/rust/setup@v2
uses: triaxtec/github-actions/rust/setup@v3

- name: Run lints
uses: triaxtec/github-actions/rust/lint@v2
uses: triaxtec/github-actions/rust/lint@v3
with:
github_token: ${{ secrets.github-token }}
clippy_args: ${{ inputs.clippy_args }}
working_directory: ${{ inputs.working_directory }}

- name: Run tests
uses: triaxtec/github-actions/rust/test@v2
uses: triaxtec/github-actions/rust/test@v3
with:
use_tool_cache: ${{ inputs.use_tool_cache }}
working_directory: ${{ inputs.working_directory }}
2 changes: 1 addition & 1 deletion generic/cache-dependencies/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ runs:
using: composite
steps:
- name: Cache dependencies
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ${{ inputs.path }}
key: ${{ inputs.package-manager }}-${{ inputs.dependency-hash-version }}-${{ hashFiles(inputs.dependency-lock-file) }}
Expand Down
2 changes: 1 addition & 1 deletion generic/serverless-deploy/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ runs:
using: composite
steps:
- name: Cache Serverless Dependencies
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ./node_modules
key: npm-${{ hashFiles('package-lock.json') }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ runs:
using: composite
steps:
- name: Setup Node
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: ${{ inputs.node-version }}

Expand Down
30 changes: 30 additions & 0 deletions python/bump-project-version/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Bump Project Version
description: Bumps the version of the project - defaults to bumping the release candidate number. Outputs the new version

inputs:
rule:
description: The version bump rule to run.
required: false
default: "prerelease"

outputs:
new-project-version:
description: The version of the current project
value: ${{ steps.get-version.outputs.project-version }}

runs:
using: composite
steps:
- name: Bump Project Version
id: bump-version
shell: bash
run: poetry version ${{ inputs.rule }}

- name: Fix Prerelease Version Format
if: ${{ inputs.rule == 'prerelease' }}
shell: bash
run: poetry version $(echo "$(poetry version -s)" | sed 's/rc/-rc./g')

- name: Get New Project Version
id: get-version
uses: triaxtec/github-actions/python/get-project-version@v3
Loading

0 comments on commit 9147234

Please sign in to comment.