Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
125 changes: 125 additions & 0 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

name: Python package

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build:

runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11"]

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics


- name: Test with pytest
run: |
pytest

- name: Setup Node.js environment
uses: actions/setup-node@v6.2.0
with:
# Version Spec of the version to use. Examples: 12.x, 10.15.1, >=10.15.0.
node-version: # optional
# File containing the version Spec of the version to use. Examples: package.json, .nvmrc, .node-version, .tool-versions.
node-version-file: # optional
# Target architecture for Node to use. Examples: x86, x64. Will use system architecture by default.
architecture: # optional
# Set this option if you want the action to check for the latest available version that satisfies the version spec.
check-latest: # optional
# Optional registry to set up for auth. Will set the registry in a project level .npmrc and .yarnrc file, and set up auth to read in from env.NODE_AUTH_TOKEN.
registry-url: # optional
# Optional scope for authenticating against scoped registries. Will fall back to the repository owner when using the GitHub Packages registry (https://npm.pkg.github.com/).
scope: # optional
# Used to pull node distributions from node-versions. Since there's a default, this is typically not supplied by the user. When running this action on github.com, the default value is sufficient. When running on GHES, you can pass a personal access token for github.com if you are experiencing rate limiting.
token: # optional, default is ${{ github.server_url == 'https://github.com' && github.token || '' }}
# Used to specify a package manager for caching in the default directory. Supported values: npm, yarn, pnpm.
cache: # optional
# Set to false to disable automatic caching. By default, caching is enabled when either devEngines.packageManager or the top-level packageManager field in package.json specifies npm as the package manager.
package-manager-cache: # optional, default is true
# Used to specify the path to a dependency file: package-lock.json, yarn.lock, etc. Supports wildcards or a list of file names for caching multiple dependencies.
cache-dependency-path: # optional
# Used to specify an alternative mirror to download Node.js binaries from
mirror: # optional
# The token used as Authorization header when fetching from the mirror
mirror-token: # optional


- name: Upload a Build Artifact
uses: actions/upload-artifact@v6.0.0
with:
# Artifact name
name: # optional, default is artifact
# A file, directory or wildcard pattern that describes what to upload
path:
# The desired behavior if no files are found using the provided path.
Available Options:
warn: Output a warning but do not fail the action
error: Fail the action with an error message
ignore: Do not output any warnings or errors, the action does not fail

if-no-files-found: # optional, default is warn
# Duration after which artifact will expire in days. 0 means using default retention.
Minimum 1 day. Maximum 90 days unless changed from the repository settings page.

retention-days: # optional
# The level of compression for Zlib to be applied to the artifact archive. The value can range from 0 to 9: - 0: No compression - 1: Best speed - 6: Default compression (same as GNU Gzip) - 9: Best compression Higher levels will result in better compression, but will take longer to complete. For large files that are not easily compressed, a value of 0 is recommended for significantly faster uploads.

compression-level: # optional, default is 6
# If true, an artifact with a matching name will be deleted before a new one is uploaded. If false, the action will fail if an artifact for the given name already exists. Does not fail if the artifact does not exist.

overwrite: # optional, default is false
# If true, hidden files will be included in the artifact. If false, hidden files will be excluded from the artifact.

include-hidden-files: # optional, default is false

- name: CN Terragrunt GitHub Actions
# You may pin to the exact commit or the version.
# uses: CloudNation-nl/cn-terragrunt-github-actions@157d7b2ada26510a0f7ea0180af89bc2cf9305e4
uses: CloudNation-nl/cn-terragrunt-github-actions@v0.0.16
with:
# Terraform or Terragrunt subcommand to execute.
tf_actions_subcommand:
# Binary to use. Terraform or Terragrunt
tf_actions_binary: # optional, default is terragrunt
# Terraform version to install.
tf_actions_version: # default is latest
# Terragrunt version to install.
tg_actions_version: # default is latest
# Hostname for the CLI credentials file.
tf_actions_cli_credentials_hostname: # optional, default is app.terraform.io
# Token for the CLI credentials file.
tf_actions_cli_credentials_token: # optional
# Whether or not to comment on pull requests.
tf_actions_comment: # optional, default is true
# Terragrunt working directory.
tf_actions_working_dir: # optional, default is .
# Write Terragrunt fmt changes to source files.
tf_actions_fmt_write: # optional


122 changes: 122 additions & 0 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
# Simple workflow for deploying static content to GitHub Pages
name: Deploy static content to Pages

on:
# Runs on pushes targeting the default branch
push:
branches: ["main"]

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

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
# Single deploy job since we're just deploying
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
# Upload entire repository
path: '.'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

- name: Cache
uses: actions/cache@v5.0.2
with:
# A list of files, directories, and wildcard patterns to cache and restore
path:
# An explicit key for restoring and saving the cache
key:
# An ordered multiline string listing the prefix-matched keys, that are used for restoring stale cache if no cache hit occurred for key. Note `cache-hit` returns false in this case.
restore-keys: # optional
# The chunk size used to split up large files during upload, in bytes
upload-chunk-size: # optional
# An optional boolean when enabled, allows windows runners to save or restore caches that can be restored or saved respectively on other platforms
enableCrossOsArchive: # optional, default is false
# Fail the workflow if cache entry is not found
fail-on-cache-miss: # optional, default is false
# Check if a cache entry exists for the given input(s) (key, restore-keys) without downloading the cache
lookup-only: # optional, default is false
# Run the post step to save the cache even if another step before fails
save-always: # optional, default is false
- name: terraform-plan-storage
# You may pin to the exact commit or the version.
# uses: cloudposse/github-action-terraform-plan-storage@55b5d342c1eefee79e661b2709e91b19b4361c6d
uses: cloudposse/github-action-terraform-plan-storage@1.14.0
with:
# which action to perform. Valid values are: 'storePlan', 'getPlan', 'taintPlan'
action: # default is storePlan
# the name of the Azure Blob Storage account to store the plan file
blobAccountName: # optional
# the name of the Azure Blob Storage container to store the plan file
blobContainerName: # optional
# the name of the S3 bucket to store the plan file
bucketName: # optional, default is terraform-plan-storage
# Commit SHA to use for fetching plan
commitSHA: # optional, default is
# the name of the component corresponding to the plan file
component: # optional
# the connection string to the CosmosDB account to store the metadata
cosmosConnectionString: # optional
# the name of the CosmosDB container to store the metadata
cosmosContainerName: # optional
# the name of the CosmosDB database to store the metadata
cosmosDatabaseName: # optional
# the endpoint of the CosmosDB account to store the metadata
cosmosEndpoint: # optional
# Fail if plan is missing
failOnMissingPlan: # optional, default is true
# the type of repository where the plan file is stored. Valid values are: 'dynamo', 'cosmodb'
metadataRepositoryType: # optional, default is dynamo
# path to the Terraform plan file. Required for 'storePlan' and 'getPlan' actions
planPath: # optional
# the type of repository where the metadata is stored. Valid values are: 's3', 'azureblob'
planRepositoryType: # optional, default is s3
# the name of the stack corresponding to the plan file
stack: # optional
# the name of the dynamodb table to store metadata
tableName: # optional, default is terraform-plan-storage
- name: Download a Build Artifact
uses: actions/download-artifact@v7.0.0
with:
# Name of the artifact to download. If unspecified, all artifacts for the run are downloaded.
name: # optional
# IDs of the artifacts to download, comma-separated. Either inputs `artifact-ids` or `name` can be used, but not both.
artifact-ids: # optional
# Destination path. Supports basic tilde expansion. Defaults to $GITHUB_WORKSPACE
path: # optional
# A glob pattern matching the artifacts that should be downloaded. Ignored if name is specified.
pattern: # optional
# When multiple artifacts are matched, this changes the behavior of the destination directories. If true, the downloaded artifacts will be in the same directory specified by path. If false, the downloaded artifacts will be extracted into individual named directories within the specified path.
merge-multiple: # optional, default is false
# The GitHub token used to authenticate with the GitHub API. This is required when downloading artifacts from a different repository or from a different workflow run. If this is not specified, the action will attempt to download artifacts from the current repository and the current workflow run.
github-token: # optional
# The repository owner and the repository name joined together by "/". If github-token is specified, this is the repository that artifacts will be downloaded from.
repository: # optional, default is ${{ github.repository }}
# The id of the workflow run where the desired download artifact was uploaded from. If github-token is specified, this is the run that artifacts will be downloaded from.
run-id: # optional, default is ${{ github.run_id }}