Skip to content

Commit 9147234

Browse files
emannBen SEthan Mann
authored
chore(release): Release v.3.0.0 [TSD-1529] (#25)
* 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 <[email protected]> --------- Co-authored-by: Ben S <[email protected]> Co-authored-by: Ethan Mann <[email protected]>
1 parent e4d6f44 commit 9147234

File tree

21 files changed

+309
-75
lines changed

21 files changed

+309
-75
lines changed

.github/workflows/node-deploy.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ jobs:
3939

4040
steps:
4141
- name: Checkout code
42-
uses: actions/checkout@v2
42+
uses: actions/checkout@v3
4343

4444
- name: Setup Node and Install Dependencies
45-
uses: triaxtec/github-actions/node/setup-node-and-install-dependencies-with-authenticated-registry@v2
45+
uses: triaxtec/github-actions/node/setup-node-and-install-dependencies-with-authenticated-registry@v3
4646
with:
4747
node-version: ${{ inputs.node-version }}
4848
npm-registry-url: ${{ secrets.npm-registry-url }}

.github/workflows/node-run-checks-and-tests.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ jobs:
2020

2121
steps:
2222
- name: Checkout code
23-
uses: actions/checkout@v2
23+
uses: actions/checkout@v3
2424

2525
- name: Setup Node and Install Dependencies
26-
uses: triaxtec/github-actions/node/setup-node-and-install-dependencies-with-authenticated-registry@v2
26+
uses: triaxtec/github-actions/node/setup-node-and-install-dependencies-with-authenticated-registry@v3
2727
with:
2828
node-version: ${{ inputs.node-version }}
2929
npm-registry-url: ${{ secrets.npm-registry-url }}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Bump Version and Tag
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
python-version:
7+
description: The version of python to install/use
8+
type: string
9+
required: false
10+
default: "3.8"
11+
secrets:
12+
GH_TOKEN:
13+
required: true
14+
15+
jobs:
16+
bump-version-and-commit:
17+
name: Bump Project Version, Commit, and Tag
18+
runs-on: ubuntu-latest
19+
20+
steps:
21+
- name: Checkout code
22+
uses: actions/checkout@v3
23+
with:
24+
token: ${{ secrets.GH_TOKEN }}
25+
26+
- name: Set up Python
27+
uses: actions/setup-python@v4
28+
with:
29+
python-version: ${{ inputs.python-version }}
30+
31+
- name: Install and Configure Poetry
32+
uses: triaxtec/github-actions/python/install-and-configure-poetry@v3
33+
with:
34+
poetry-version: 1.4.1
35+
working-directory: ${{inputs.working-directory}}
36+
37+
- name: Bump Project Version
38+
id: bump-version
39+
uses: triaxtec/github-actions/python/bump-project-version@v3
40+
41+
- uses: stefanzweifel/git-auto-commit-action@v4
42+
with:
43+
commit_message: "chore: Bump version to v.${{ steps.bump-version.outputs.new-project-version }}"
44+
tagging_message: v.${{ steps.bump-version.outputs.new-project-version }}

.github/workflows/python-deploy-serverless.yml

+19-9
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
environment:
77
required: true
88
type: string
9-
cli-name:
9+
predeploy-script:
1010
required: false
1111
type: string
1212
working-directory:
@@ -26,6 +26,11 @@ on:
2626
type: string
2727
required: false
2828
default: "us-east-1"
29+
python-version:
30+
description: The version of python to install/use
31+
type: string
32+
required: false
33+
default: "3.8"
2934
secrets:
3035
private-package-repo-username:
3136
required: false
@@ -39,30 +44,35 @@ on:
3944
jobs:
4045
build-and-deploy:
4146
name: Deploy to ${{ inputs.environment }}
47+
4248
runs-on: ubuntu-latest
49+
4350
steps:
4451
- name: Checkout code
45-
uses: actions/checkout@v2
52+
uses: actions/checkout@v3
4653

47-
- name: Setup Python and Poetry and Install Dependencies
48-
uses: triaxtec/github-actions/python/setup-python-and-poetry-and-install-dependencies@v2
54+
- name: Setup python and poetry and install dependencies
55+
uses: triaxtec/github-actions/python/setup-python-and-poetry-and-install-dependencies@v3
4956
with:
50-
working-directory: ${{ inputs.working-directory }}
57+
python-version: ${{ inputs.python-version }}
5158
private-package-repo-url: ${{ inputs.private-package-repo-url }}
5259
private-package-repo-username: ${{ secrets.private-package-repo-username }}
60+
private-package-repo-password: ${{ secrets.private-package-repo-password }}
61+
working-directory: ${{ inputs.working-directory }}
5362
dependency-hash-version: ${{ inputs.dependency-hash-version }}
63+
exclude-dev-dependencies: true
5464

55-
- name: Build Code
65+
- name: Run Predeploy Script
5666
working-directory: ${{ inputs.working-directory }}
57-
if: ${{ inputs.cli-name != '' }}
58-
run: poetry run ${{ inputs.cli-name }} build
67+
if: ${{ inputs.predeploy-script != '' }}
68+
run: ${{ inputs.predeploy-script }}
5969

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

6474
- name: Serverless Deploy to ${{ inputs.environment }}
65-
uses: triaxtec/github-actions/generic/serverless-deploy@v2
75+
uses: triaxtec/github-actions/generic/serverless-deploy@v3
6676
with:
6777
environment: ${{ inputs.environment }}
6878
aws-default-region: ${{ inputs.aws-default-region }}

.github/workflows/python-generate-and-publish-client-libraries.yml

+12-5
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,17 @@ on:
2929
description: The version of openapi-python-client to use to build the python client library
3030
type: string
3131
required: false
32-
default: "0.11.1"
32+
default: "0.13.2"
3333
angular-generator-version:
3434
description: The version of OpenAPITools Generator to use to build the angular client library
3535
type: string
3636
required: false
3737
default: "5.1.1"
38+
python-version:
39+
description: The version of python to install/use
40+
type: string
41+
required: false
42+
default: "3.8"
3843
secrets:
3944
private-package-repo-username:
4045
required: false
@@ -49,8 +54,9 @@ jobs:
4954
runs-on: ubuntu-latest
5055
steps:
5156
- name: Generate OpenAPI Document
52-
uses: triaxtec/github-actions/python/generate-openapi-doc@v2
57+
uses: triaxtec/github-actions/python/generate-openapi-doc@v3
5358
with:
59+
python-version: ${{ inputs.python-version }}
5460
private-package-repo-url: ${{ inputs.private-package-repo-url }}
5561
private-package-repo-username: ${{ secrets.private-package-repo-username }}
5662
cli-name: ${{ inputs.cli-name }}
@@ -59,7 +65,7 @@ jobs:
5965
run: pipx run --spec openapi-python-client==${{ inputs.python-generator-version }} openapi-python-client generate --config python-generator-config.yml --path openapi.json
6066

6167
- name: Publish Python Client
62-
uses: triaxtec/github-actions/python/publish-package@v2
68+
uses: triaxtec/github-actions/python/publish-package@v3
6369
with:
6470
token: ${{ secrets.private-package-repo-push-token }}
6571
private-package-repo-url: ${{ inputs.private-package-repo-url }}
@@ -70,14 +76,15 @@ jobs:
7076
runs-on: ubuntu-latest
7177
steps:
7278
- name: Generate OpenAPI Document
73-
uses: triaxtec/github-actions/python/generate-openapi-doc@v2
79+
uses: triaxtec/github-actions/python/generate-openapi-doc@v3
7480
with:
81+
python-version: ${{ inputs.python-version }}
7582
private-package-repo-url: ${{ inputs.private-package-repo-url }}
7683
private-package-repo-username: ${{ secrets.private-package-repo-username }}
7784
cli-name: ${{ inputs.cli-name }}
7885

7986
- name: Set up Node
80-
uses: actions/setup-node@v2.1.4
87+
uses: actions/setup-node@v3
8188
with:
8289
node-version: '14'
8390

.github/workflows/python-publish-package.yml

+9-3
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ on:
2222
type: string
2323
required: false
2424
default: "."
25+
python-version:
26+
description: The version of python to install/use
27+
type: string
28+
required: false
29+
default: "3.8"
2530
secrets:
2631
private-package-repo-username:
2732
required: false
@@ -33,19 +38,20 @@ jobs:
3338
name: Publish Package
3439
runs-on: ubuntu-latest
3540
steps:
36-
- uses: actions/checkout@v2
41+
- uses: actions/checkout@v3
3742

3843
- name: Setup Python and Poetry and Install Dependencies
39-
uses: triaxtec/github-actions/python/setup-python-and-poetry-and-install-dependencies@v2
44+
uses: triaxtec/github-actions/python/setup-python-and-poetry-and-install-dependencies@v3
4045
with:
46+
python-version: ${{ inputs.python-version }}
4147
private-package-repo-url: ${{ inputs.private-package-repo-url }}
4248
private-package-repo-username: ${{ secrets.private-package-repo-username }}
4349
dependency-hash-version: ${{ inputs.dependency-hash-version }}
4450
exclude-dev-dependencies: true
4551
extras: ${{ inputs.extras }}
4652

4753
- name: Build and Publish
48-
uses: triaxtec/github-actions/python/publish-package@v2
54+
uses: triaxtec/github-actions/python/publish-package@v3
4955
with:
5056
private-package-repo-url: ${{ inputs.private-package-repo-url }}
5157
token: ${{ secrets.private-package-repo-push-token }}

.github/workflows/python-run-checks-and-tests.yml

+16-3
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,17 @@ on:
3838
type: string
3939
required: false
4040
default: "."
41+
python-version:
42+
description: The version of python to install/use
43+
type: string
44+
required: false
45+
default: "3.8"
46+
skip-coverage-check:
47+
description: Set to true to disable enforcement of 100% code coverage.
48+
type: boolean
49+
required: false
50+
default: false
51+
4152
secrets:
4253
private-package-repo-username:
4354
required: false
@@ -51,15 +62,16 @@ jobs:
5162

5263
steps:
5364
- name: Checkout code
54-
uses: actions/checkout@v2
65+
uses: actions/checkout@v3
5566

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

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

7486
- name: Run Checks and Tests
75-
uses: triaxtec/github-actions/python/run-checks@v2
87+
uses: triaxtec/github-actions/python/run-checks@v3
7688
with:
7789
module: ${{ inputs.module }}
7890
additional-modules-to-lint: ${{ inputs.additional-modules-to-lint }}
91+
skip-coverage-check: ${{ inputs.skip-coverage-check }}
7992
env:
8093
AWS_DEFAULT_REGION: us-east-1
8194

.github/workflows/rust-build-and-upload-binaries.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,17 @@ jobs:
1717

1818
steps:
1919
- name: Checkout code
20-
uses: actions/checkout@v2
20+
uses: actions/checkout@v3
2121

2222
- name: Add SSH key so cargo can access private repos
2323
uses: webfactory/[email protected]
2424
with:
2525
ssh-private-key: ${{ secrets.ssh-private-key }}
2626

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

3030
- name: Build and Upload
31-
uses: triaxtec/github-actions/rust/build-and-upload@v2
31+
uses: triaxtec/github-actions/rust/build-and-upload@v3
3232
with:
3333
binary_name: eat

.github/workflows/rust-run-checks-and-tests.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -39,20 +39,20 @@ jobs:
3939
ssh-private-key: ${{ secrets.ssh-private-key }}
4040

4141
- name: Checkout code
42-
uses: actions/checkout@v2
42+
uses: actions/checkout@v3
4343

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

4747
- name: Run lints
48-
uses: triaxtec/github-actions/rust/lint@v2
48+
uses: triaxtec/github-actions/rust/lint@v3
4949
with:
5050
github_token: ${{ secrets.github-token }}
5151
clippy_args: ${{ inputs.clippy_args }}
5252
working_directory: ${{ inputs.working_directory }}
5353

5454
- name: Run tests
55-
uses: triaxtec/github-actions/rust/test@v2
55+
uses: triaxtec/github-actions/rust/test@v3
5656
with:
5757
use_tool_cache: ${{ inputs.use_tool_cache }}
5858
working_directory: ${{ inputs.working_directory }}

generic/cache-dependencies/action.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ runs:
2020
using: composite
2121
steps:
2222
- name: Cache dependencies
23-
uses: actions/cache@v2
23+
uses: actions/cache@v3
2424
with:
2525
path: ${{ inputs.path }}
2626
key: ${{ inputs.package-manager }}-${{ inputs.dependency-hash-version }}-${{ hashFiles(inputs.dependency-lock-file) }}

generic/serverless-deploy/action.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ runs:
2424
using: composite
2525
steps:
2626
- name: Cache Serverless Dependencies
27-
uses: actions/cache@v2
27+
uses: actions/cache@v3
2828
with:
2929
path: ./node_modules
3030
key: npm-${{ hashFiles('package-lock.json') }}

node/setup-node-and-install-dependencies-with-authenticated-registry/action.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ runs:
1717
using: composite
1818
steps:
1919
- name: Setup Node
20-
uses: actions/setup-node@v2
20+
uses: actions/setup-node@v3
2121
with:
2222
node-version: ${{ inputs.node-version }}
2323

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Bump Project Version
2+
description: Bumps the version of the project - defaults to bumping the release candidate number. Outputs the new version
3+
4+
inputs:
5+
rule:
6+
description: The version bump rule to run.
7+
required: false
8+
default: "prerelease"
9+
10+
outputs:
11+
new-project-version:
12+
description: The version of the current project
13+
value: ${{ steps.get-version.outputs.project-version }}
14+
15+
runs:
16+
using: composite
17+
steps:
18+
- name: Bump Project Version
19+
id: bump-version
20+
shell: bash
21+
run: poetry version ${{ inputs.rule }}
22+
23+
- name: Fix Prerelease Version Format
24+
if: ${{ inputs.rule == 'prerelease' }}
25+
shell: bash
26+
run: poetry version $(echo "$(poetry version -s)" | sed 's/rc/-rc./g')
27+
28+
- name: Get New Project Version
29+
id: get-version
30+
uses: triaxtec/github-actions/python/get-project-version@v3

0 commit comments

Comments
 (0)