diff --git a/.github/workflows/node-deploy.yml b/.github/workflows/node-deploy.yml index 752af63..678a9b9 100644 --- a/.github/workflows/node-deploy.yml +++ b/.github/workflows/node-deploy.yml @@ -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 }} diff --git a/.github/workflows/node-run-checks-and-tests.yml b/.github/workflows/node-run-checks-and-tests.yml index 38f4195..6049459 100644 --- a/.github/workflows/node-run-checks-and-tests.yml +++ b/.github/workflows/node-run-checks-and-tests.yml @@ -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 }} diff --git a/.github/workflows/python-bump-version-and-tag.yml b/.github/workflows/python-bump-version-and-tag.yml new file mode 100644 index 0000000..afaf9c4 --- /dev/null +++ b/.github/workflows/python-bump-version-and-tag.yml @@ -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 }} diff --git a/.github/workflows/python-deploy-serverless.yml b/.github/workflows/python-deploy-serverless.yml index d848113..af1bc56 100644 --- a/.github/workflows/python-deploy-serverless.yml +++ b/.github/workflows/python-deploy-serverless.yml @@ -6,7 +6,7 @@ on: environment: required: true type: string - cli-name: + predeploy-script: required: false type: string working-directory: @@ -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 @@ -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 }} diff --git a/.github/workflows/python-generate-and-publish-client-libraries.yml b/.github/workflows/python-generate-and-publish-client-libraries.yml index a25b70c..3f0be12 100644 --- a/.github/workflows/python-generate-and-publish-client-libraries.yml +++ b/.github/workflows/python-generate-and-publish-client-libraries.yml @@ -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 @@ -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 }} @@ -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 }} @@ -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' diff --git a/.github/workflows/python-publish-package.yml b/.github/workflows/python-publish-package.yml index 6c22657..1e1ecdc 100644 --- a/.github/workflows/python-publish-package.yml +++ b/.github/workflows/python-publish-package.yml @@ -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 @@ -33,11 +38,12 @@ 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 }} @@ -45,7 +51,7 @@ jobs: 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 }} diff --git a/.github/workflows/python-run-checks-and-tests.yml b/.github/workflows/python-run-checks-and-tests.yml index 4a2156c..f5a38ba 100644 --- a/.github/workflows/python-run-checks-and-tests.yml +++ b/.github/workflows/python-run-checks-and-tests.yml @@ -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 @@ -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 }} @@ -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 diff --git a/.github/workflows/rust-build-and-upload-binaries.yml b/.github/workflows/rust-build-and-upload-binaries.yml index f54194c..84f0840 100644 --- a/.github/workflows/rust-build-and-upload-binaries.yml +++ b/.github/workflows/rust-build-and-upload-binaries.yml @@ -17,7 +17,7 @@ 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 @@ -25,9 +25,9 @@ jobs: 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 \ No newline at end of file diff --git a/.github/workflows/rust-run-checks-and-tests.yml b/.github/workflows/rust-run-checks-and-tests.yml index bbc1351..a529b83 100644 --- a/.github/workflows/rust-run-checks-and-tests.yml +++ b/.github/workflows/rust-run-checks-and-tests.yml @@ -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 }} diff --git a/generic/cache-dependencies/action.yml b/generic/cache-dependencies/action.yml index 719cd74..1406ee5 100644 --- a/generic/cache-dependencies/action.yml +++ b/generic/cache-dependencies/action.yml @@ -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) }} diff --git a/generic/serverless-deploy/action.yml b/generic/serverless-deploy/action.yml index 49678ea..df7f1e2 100644 --- a/generic/serverless-deploy/action.yml +++ b/generic/serverless-deploy/action.yml @@ -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') }} diff --git a/node/setup-node-and-install-dependencies-with-authenticated-registry/action.yml b/node/setup-node-and-install-dependencies-with-authenticated-registry/action.yml index 3bccdc0..aa8cd63 100644 --- a/node/setup-node-and-install-dependencies-with-authenticated-registry/action.yml +++ b/node/setup-node-and-install-dependencies-with-authenticated-registry/action.yml @@ -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 }} diff --git a/python/bump-project-version/action.yml b/python/bump-project-version/action.yml new file mode 100644 index 0000000..8d02cd9 --- /dev/null +++ b/python/bump-project-version/action.yml @@ -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 \ No newline at end of file diff --git a/python/generate-openapi-doc/action.yml b/python/generate-openapi-doc/action.yml index f111700..29de545 100644 --- a/python/generate-openapi-doc/action.yml +++ b/python/generate-openapi-doc/action.yml @@ -24,16 +24,21 @@ inputs: required: false private-package-repo-password: required: false + python-version: + description: The version of python to install/use + required: false + default: "3.8" runs: using: composite 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 + 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: ${{ inputs.private-package-repo-username }} private-package-repo-password: ${{ inputs.private-package-repo-password }} diff --git a/python/get-project-version/action.yml b/python/get-project-version/action.yml new file mode 100644 index 0000000..58bbeec --- /dev/null +++ b/python/get-project-version/action.yml @@ -0,0 +1,15 @@ +name: Get Project Version +description: Gets the version of the current project and stores it as an output, to be used by other actions/workflow steps. + +outputs: + project-version: + description: The version of the current project + value: ${{ steps.get-version.outputs.project-version }} + +runs: + using: composite + steps: + - name: Get Project Version + id: get-version + shell: bash + run: echo "project-version=$(poetry version -s)" >> $GITHUB_OUTPUT diff --git a/python/install-and-configure-poetry/action.yml b/python/install-and-configure-poetry/action.yml new file mode 100644 index 0000000..3e23866 --- /dev/null +++ b/python/install-and-configure-poetry/action.yml @@ -0,0 +1,43 @@ +name: Install and Configure Poetry +description: Installs and configures poetry. +inputs: + poetry-version: + description: The version of poetry to install + required: false + default: "1.4.1" + private-package-repo-url: + description: The url of the private package repository you want to add to poetry. You must also specify `private-package-repo-username` + required: false + default: "" + private-package-repo-username: + description: The username for the private package repository you want to add to poetry + required: false + default: "" + private-package-repo-password: + description: The password for the private package repository you want to add to poetry + required: false + default: "" + working-directory: + description: The working directory where this action should run. Defaults to the root of the git repository. + required: false + default: "." + +runs: + using: composite + steps: + - name: Install and Configure Poetry + shell: bash + working-directory: "${{inputs.working-directory}}" + run: | + python -m pip install --upgrade pip + pip install poetry==${{inputs.poetry-version}} --upgrade + poetry config virtualenvs.in-project true + if [ -n "${{inputs.private-package-repo-url}}" ]; then + if [ -z "${{inputs.private-package-repo-username}}" ]; then + echo "private-package-repo-username is required when private-package-repo-url is provided" 1>&2 + exit 1 + fi + + poetry config repositories.private "${{ inputs.private-package-repo-url }}" + poetry config http-basic.private "${{ inputs.private-package-repo-username }}" "${{ inputs.private-package-repo-password }}" + fi diff --git a/python/install-dependencies-with-poetry/action.yml b/python/install-dependencies-with-poetry/action.yml new file mode 100644 index 0000000..48d427e --- /dev/null +++ b/python/install-dependencies-with-poetry/action.yml @@ -0,0 +1,69 @@ +name: Install Poetry and Dependencies +description: Installs/configures poetry and then installs the python dependencies. +inputs: + poetry-version: + description: The version of poetry to install + required: false + default: "1.4.1" + private-package-repo-url: + description: The url of the private package repository you want to add to poetry. You must also specify `private-package-repo-username` + required: false + default: "" + private-package-repo-username: + description: The username for the private package repository you want to add to poetry + required: false + default: "" + private-package-repo-password: + description: The password for the private package repository you want to add to poetry + required: false + default: "" + dependency-hash-version: + description: A quick way to generate a completely new cache if something goes awry and loading from partial cache keys is causing issues. + required: false + default: "v1" + exclude-dev-dependencies: + description: If set to true, poetry install will be called with the --no-dev + required: false + default: "false" + extras: + description: Extras to include when installing this package + required: false + default: NOT_SPECIFIED + working-directory: + description: The working directory where this action should run. Defaults to the root of the git repository. + required: false + default: "." + +runs: + using: composite + steps: + - name: Cache dependencies + uses: triaxtec/github-actions/generic/cache-dependencies@v3 + with: + path: ./.venv + package-manager: poetry + dependency-hash-version: ${{ inputs.dependency-hash-version }} + dependency-lock-file: poetry.lock + + - name: Install and Configure Poetry + uses: triaxtec/github-actions/python/install-and-configure-poetry@v3 + with: + poetry-version: ${{inputs.poetry-version}} + private-package-repo-url: ${{inputs.private-package-repo-url}} + private-package-repo-username: ${{inputs.private-package-repo-username}} + private-package-repo-password: ${{inputs.private-package-repo-password}} + working-directory: ${{inputs.working-directory}} + + + - name: Install Python Dependencies with Poetry + shell: bash + working-directory: "${{inputs.working-directory}}" + run: | + COMMAND="poetry install" + if [[ "${{inputs.exclude-dev-dependencies}}" != "false" ]]; then + COMMAND="$COMMAND --no-dev" + fi + if [[ "${{inputs.extras}}" != "NOT_SPECIFIED" ]]; then + COMMAND="$COMMAND -E ${{inputs.extras}}" + fi + eval $COMMAND diff --git a/python/run-checks/action.yml b/python/run-checks/action.yml index 5536ee5..c257243 100644 --- a/python/run-checks/action.yml +++ b/python/run-checks/action.yml @@ -12,6 +12,10 @@ inputs: description: The directory (or path from the project root) containing the pytests to run. Defaults to "tests". required: false default: tests + skip-coverage-check: + description: Set to true to disable enforcement of 100% code coverage. + required: false + default: false runs: using: composite @@ -41,7 +45,10 @@ runs: # 42194: Ignore safety advisory for encrypted values in sqlalchemy-utils, a feature we don't use. # 42050: Ignore safety advisory for more secure cookies in werkzeug, another unused feature. # 51668: Ignore safety advisory for sqlalchemy str(engine) including cleartext password - run: poetry export -f requirements.txt | poetry run safety check --bare --stdin -i 42194 -i 42050 -i 51668 + # 52983: Ignore safety advisory for httpx <0.23 - we aren't effected + there are breaking changes we aren't ready for + # 53332: (Temporary) ignore starlette because there are breaking changes in fastapi we're not ready for + # 53310: (Temporary) ignore fastapi because there are breaking changes we're not ready for + run: poetry export -f requirements.txt | poetry run safety check --bare --stdin -i 42194 -i 42050 -i 51668 -i 52983 -i 53310 -i 53332 - name: Run mypy shell: bash @@ -50,3 +57,8 @@ runs: - name: Run pytest shell: bash run: poetry run pytest --cov=${{ inputs.module }} --cov-report=term-missing ${{ inputs.test-dir }} + + - name: Enforce 100% Test Coverage + if: ${{ inputs.skip-coverage-check == 'false' }} + shell: bash + run: poetry run coverage report --fail-under=100 \ No newline at end of file diff --git a/python/setup-python-and-poetry-and-install-dependencies/action.yml b/python/setup-python-and-poetry-and-install-dependencies/action.yml index 06ab798..3e21121 100644 --- a/python/setup-python-and-poetry-and-install-dependencies/action.yml +++ b/python/setup-python-and-poetry-and-install-dependencies/action.yml @@ -1,6 +1,10 @@ name: Install Poetry and Dependencies description: Installs/configures poetry and then installs the python dependencies. inputs: + poetry-version: + description: The version of poetry to install + required: false + default: "1.4.1" private-package-repo-url: description: The url of the private package repository you want to add to poetry. You must also specify `private-package-repo-username` required: false @@ -38,43 +42,19 @@ runs: using: composite steps: - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: ${{ inputs.python-version }} - - name: Cache dependencies - uses: triaxtec/github-actions/generic/cache-dependencies@v2 + - name: Install Dependencies with Poetry + uses: triaxtec/github-actions/python/install-dependencies-with-poetry@v3 with: - path: ./.venv - package-manager: poetry - dependency-hash-version: ${{ inputs.dependency-hash-version }} - dependency-lock-file: poetry.lock - - - name: Install and Configure Poetry - shell: bash - working-directory: "${{inputs.working-directory}}" - run: | - python -m pip install --upgrade pip - pip install poetry==1.1.8 poetry-core==1.0.4 --upgrade - poetry config virtualenvs.in-project true - if [ -n "${{inputs.private-package-repo-url}}" ]; then - if [ -z "${{inputs.private-package-repo-username}}" ]; then - echo "private-package-repo-username is required when private-package-repo-url is provided" 1>&2 - exit 1 - fi + poetry-version: ${{inputs.poetry-version}} + private-package-repo-url: ${{inputs.private-package-repo-url}} + private-package-repo-username: ${{inputs.private-package-repo-username}} + private-package-repo-password: ${{inputs.private-package-repo-password}} + working-directory: ${{inputs.working-directory}} + dependency-hash-version: ${{inputs.dependency-hash-version}} + exclude-dev-dependencies: ${{inputs.exclude-dev-dependencies}} + extras: ${{inputs.extras}} - poetry config repositories.private "${{ inputs.private-package-repo-url }}" - poetry config http-basic.private "${{ inputs.private-package-repo-username }}" "${{ inputs.private-package-repo-password }}" - fi - - name: Install Python Dependencies - shell: bash - working-directory: "${{inputs.working-directory}}" - run: | - COMMAND="poetry install" - if [[ "${{inputs.exclude-dev-dependencies}}" != "false" ]]; then - COMMAND="$COMMAND --no-dev" - fi - if [[ "${{inputs.extras}}" != "NOT_SPECIFIED" ]]; then - COMMAND="$COMMAND -E ${{inputs.extras}}" - fi - eval $COMMAND diff --git a/rust/build-and-upload/action.yml b/rust/build-and-upload/action.yml index 55049dd..ce60a25 100644 --- a/rust/build-and-upload/action.yml +++ b/rust/build-and-upload/action.yml @@ -22,7 +22,7 @@ runs: args: --release --manifest-path "${{ inputs.working_directory }}/Cargo.toml" - name: Upload the binary - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 # The grossness with fromJSON works around the fact that conditionals are not supported # by implicitly indexing an array (false == 0, true == 1). with: diff --git a/rust/run-checks-and-tests/action.yml b/rust/run-checks-and-tests/action.yml index 13012c8..613feba 100644 --- a/rust/run-checks-and-tests/action.yml +++ b/rust/run-checks-and-tests/action.yml @@ -22,14 +22,14 @@ runs: using: composite steps: - name: Run lints - uses: triaxtec/github-actions/rust/lint@v2 + uses: triaxtec/github-actions/rust/lint@v3 with: github_token: ${{ inputs.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 }}