Skip to content

Commit

Permalink
Merge branch 'master' into feature/msi-701-add-custom-tfvars-directory
Browse files Browse the repository at this point in the history
  • Loading branch information
jake-skipper committed Dec 11, 2023
2 parents b33fcf0 + 7af6cc3 commit 278d3c4
Show file tree
Hide file tree
Showing 305 changed files with 24,630 additions and 24,170 deletions.
12 changes: 12 additions & 0 deletions .devcontainer/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# EditorConfig is awesome: https://EditorConfig.org

# top-most EditorConfig file
root = true

[*]
indent_style = space
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = false
insert_final_newline = true
30 changes: 16 additions & 14 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,29 +1,37 @@
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.241.1/containers/ubuntu/.devcontainer/base.Dockerfile

# [Choice] Ubuntu version (use ubuntu-22.04 or ubuntu-18.04 on local arm64/Apple Silicon): ubuntu-22.04, ubuntu-20.04, ubuntu-18.04
# [Choice] Ubuntu version (use ubuntu-22.04 or ubuntu-20.04 on local arm64/Apple Silicon): ubuntu-22.04, ubuntu-20.04
ARG VARIANT="ubuntu-22.04"
FROM mcr.microsoft.com/vscode/devcontainers/base:0-${VARIANT}

# [Optional] Uncomment this section to install additional OS packages.
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& apt-get -y install --no-install-recommends curl git make pkg-config bash-completion \
python3-virtualenv python3-pip python3-venv python3-dev \
software-properties-common npm binutils
software-properties-common binutils

# Setup Apt for newer versions of NodeJS
RUN curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash - && \
sudo apt-get install -y nodejs

# Install nodejs
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& apt-get -y install --no-install-recommends nodejs

# Add additional python options
RUN sudo add-apt-repository ppa:deadsnakes/ppa

# Install Python 3.7, 3.8, and 3.9
# Install Python 3.11, 3.10, and 3.9
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& apt-get -y install --no-install-recommends python3.7 python3.7-venv python3.7-dev \
python3.8 python3.8-venv python3.8-dev \
&& apt-get -y install --no-install-recommends python3.11 python3.11-venv python3.11-dev \
python3.10 python3.10-venv python3.10-dev \
python3.9 python3.9-venv python3.9-dev


# Setup alternatives
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3.9 1

# Update to use python 3.7 by default
# Update to use python 3.9 by default
RUN update-alternatives --set python $(update-alternatives --list python | grep python3.9)

# VSCODE user commands
Expand All @@ -34,14 +42,8 @@ ADD --chown=vscode:vscode files/.bash_completion /home/vscode/.bash_completion
RUN mkdir /home/vscode/.bash_completion.d/

# Setup AWS CLI
RUN pip3 install --user awscli
RUN pip3 install --user awscli poetry==1.5.1
RUN echo "complete -C '/home/vscode/.local/bin/aws_completer' aws" >> ~/.bashrc

# Setup Poetry
RUN bash -c "curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/install-poetry.py | python - \
&& echo 'export PATH=$HOME/.local/bin:\$PATH' >> ~/.bashrc"
RUN bash -c "export PATH=$HOME/.local/bin:\$PATH \
&& poetry completions bash > ~/.bash_completion.d/poetry.bash-completion"

# Setup OS_NAME var for runway builds from this dev container
RUN echo "export OS_NAME=ubuntu-18.04" >> ~/.bashrc
RUN echo "export OS_NAME=ubuntu-latest" >> ~/.bashrc
3 changes: 3 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,8 @@
"ms-python.python"
]
}
},
"features": {
"ghcr.io/devcontainers/features/docker-in-docker:2": {}
}
}
6 changes: 3 additions & 3 deletions .github/scripts/cicd/build_pyinstaller.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@

set -ev

if [ "$OS_NAME" == "ubuntu-18.04" ]; then
if [ "$OS_NAME" == "ubuntu-latest" ]; then
LOCAL_OS_NAME="linux"
elif [ "$OS_NAME" == "macos-10.15" ]; then
elif [ "$OS_NAME" == "macos-12" ]; then
LOCAL_OS_NAME="osx"
elif [ "$OS_NAME" == "windows-latest" ]; then
LOCAL_OS_NAME="windows"
else
echo 'Environment variable "OS_NAME" must be one of ["ubuntu-18.04", "macos-10.15", "windows-latest"]'
echo 'Environment variable "OS_NAME" must be one of ["ubuntu-latest", "macos-12", "windows-latest"]'
exit 1
fi

Expand Down
91 changes: 45 additions & 46 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,24 @@
name: CI/CD


on:
pull_request: # any pull request
push:
branches:
- master


defaults:
run:
shell: bash


env:
AWS_DEFAULT_OUTPUT: json
AWS_DEFAULT_REGION: us-east-1
AWS_MAX_ATTEMPTS: 20 # retry attempts for AWS API calls
AWS_RETRY_MODE: standard # defaults to "legacy"; this handles more errors
NODE_VERSION: '16'
AWS_RETRY_MODE: adaptive # defaults to "legacy"; this handles more errors
NODE_VERSION: '18'
PYTEST_ADDOPTS: --color=yes
RUNWAY_TEST_NAMESPACE: gh-${{ github.run_id }}
PIPENV_IGNORE_VIRTUALENVS: '1'


jobs:
Expand All @@ -30,7 +28,7 @@ jobs:
infra-test: ${{ steps.filter.outputs.infrastructure-test }}
infra-test-alt: ${{ steps.filter.outputs.infrastructure-test-alt }}
steps:
- uses: actions/checkout@v3 # not needed for pull_request
- uses: actions/checkout@v4 # not needed for pull_request
if: |
github.event_name == 'push'
- uses: dorny/paths-filter@v2 # cspell:ignore dorny
Expand Down Expand Up @@ -61,13 +59,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- uses: actions/setup-python@v3
uses: actions/checkout@v4
- uses: actions/setup-python@v5
id: setup-python
with:
python-version: 3.8
- uses: Gr1N/setup-poetry@v7
- uses: actions/cache@v2.1.7
python-version: 3.9
- uses: Gr1N/setup-poetry@v8
- uses: actions/cache@v3
id: cache
with:
path: .venv
Expand All @@ -77,7 +75,7 @@ jobs:
run: poetry run pip --version >/dev/null 2>&1 || rm -rf .venv
- run: poetry install --extras docs -vv
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.DEPLOY_AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.DEPLOY_AWS_SECRET_ACCESS_KEY }}
Expand All @@ -90,26 +88,26 @@ jobs:
name: Lint Python
strategy:
matrix:
python-version: [3.7, 3.8, 3.9]
os: [ubuntu-18.04, windows-latest]
python-version: [3.9, '3.10', '3.11']
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
env:
# populating AWS creds with fake values
AWS_ACCESS_KEY_ID: test
AWS_SECRET_ACCESS_KEY: test
steps:
- name: Checkout Repo
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- uses: actions/setup-python@v3
- uses: actions/setup-python@v5
id: setup-python
with:
python-version: ${{ matrix.python-version }}
- uses: Gr1N/setup-poetry@v7
- uses: actions/cache@v2.1.7
- uses: Gr1N/setup-poetry@v8
- uses: actions/cache@v3
id: cache
with:
path: .venv
Expand All @@ -127,15 +125,15 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]
python-version: [3.9]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
id: setup-python
with:
python-version: ${{ matrix.python-version }}
- uses: Gr1N/setup-poetry@v7
- uses: actions/cache@v2.1.7
- uses: Gr1N/setup-poetry@v8
- uses: actions/cache@v3
id: cache
with:
path: .venv
Expand All @@ -144,7 +142,7 @@ jobs:
if: runner.os != 'Windows' && steps.cache.outputs.cache-hit == 'true'
run: poetry run pip --version >/dev/null 2>&1 || rm -rf .venv
- run: poetry install --extras docs -vv
- uses: pre-commit/action@v2.0.3
- uses: pre-commit/action@v3.0.0
test-functional:
name: Functional Tests
needs: deploy-test-infrastructure
Expand All @@ -157,16 +155,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- uses: actions/setup-node@v3
uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- uses: actions/setup-python@v3
- uses: actions/setup-python@v5
id: setup-python
with:
python-version: 3.8
- uses: Gr1N/setup-poetry@v7
- uses: actions/cache@v2.1.7
python-version: 3.9
- uses: Gr1N/setup-poetry@v8
- uses: actions/cache@v3
id: cache
with:
path: .venv
Expand All @@ -180,7 +178,7 @@ jobs:
sudo apt update -y
sudo apt install -y default-libmysqlclient-dev libxml2-dev libxmlsec1-dev libxmlsec1-openssl pkg-config
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.TEST_RUNNER_AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.TEST_RUNNER_AWS_SECRET_ACCESS_KEY }}
Expand All @@ -191,28 +189,28 @@ jobs:
name: Test Python
strategy:
matrix:
python-version: [3.7, 3.8, 3.9]
os: [ubuntu-18.04, windows-latest]
python-version: [3.9, '3.10', '3.11']
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
env:
# populating AWS creds with fake values
AWS_ACCESS_KEY_ID: test
AWS_SECRET_ACCESS_KEY: test
steps:
- name: Checkout Repo (complete)
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- uses: actions/setup-python@v3
- uses: actions/setup-python@v5
id: setup-python
with:
python-version: ${{ matrix.python-version }}
- uses: Gr1N/setup-poetry@v7
- uses: actions/cache@v2.1.7
- uses: Gr1N/setup-poetry@v8
- uses: actions/cache@v3
id: cache
with:
path: .venv
Expand All @@ -225,7 +223,7 @@ jobs:
run: make npm-install
- name: Configure Pagefile # avoid MemoryError during tests
if: runner.os == 'Windows'
uses: al-cheb/configure-pagefile-action@v1.2 # cspell:ignore cheb
uses: al-cheb/configure-pagefile-action@v1.3 # cspell:ignore cheb
with:
minimum-size: 16GB
maximum-size: 16GB
Expand All @@ -234,8 +232,9 @@ jobs:
# assertions assume linux so some fail when run on windows
run: make test cov-xml
- name: Upload to Codecov
uses: codecov/codecov-action@v2.1.0
uses: codecov/codecov-action@v3.1.4
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
build-pypi:
name: Build PyPi 📦
Expand All @@ -244,22 +243,22 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo (complete)
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v3
- uses: actions/setup-python@v5
id: setup-python
with:
python-version: 3.8
python-version: 3.9
# Remove apt repos that are known to break from time to time
# See https://github.com/actions/virtual-environments/issues/323
- name: Remove broken apt repos (ubuntu)
run: |
for apt_file in `grep -lr microsoft /etc/apt/sources.list.d/`; do sudo rm $apt_file; done
- name: Install Dependencies (ubuntu)
run: sudo apt-get update && sudo apt-get install sed -y
- uses: Gr1N/setup-poetry@v7
- uses: actions/cache@v2.1.7
- uses: Gr1N/setup-poetry@v8
- uses: actions/cache@v3
id: cache
with:
path: .venv
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/label-maker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Run Label Maker
uses: crazy-max/ghaction-github-labeler@v3
uses: crazy-max/ghaction-github-labeler@v5
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
yaml-file: .github/labels.yml
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/on-pr-target-opened.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
name: Label PR
runs-on: ubuntu-latest
steps:
- uses: release-drafter/release-drafter@v5.18.1
- uses: release-drafter/release-drafter@v5.25.0
with:
disable-releaser: true
env:
Expand Down
Loading

0 comments on commit 278d3c4

Please sign in to comment.