Skip to content

Commit

Permalink
[153] Have PR workflow run against all OSes
Browse files Browse the repository at this point in the history
Mirrors the structure of the NodeJS ric with respect to github actions
to run integ tests against all vendors.

Issues with particular vendors won't be fixed in this PR to keep it
short.

Drops: python 3.7 in all but al1
  • Loading branch information
m-rph committed Jun 19, 2024
1 parent 3a7d01e commit d5604d6
Show file tree
Hide file tree
Showing 7 changed files with 49 additions and 14 deletions.
46 changes: 40 additions & 6 deletions .github/workflows/test-on-push-and-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,45 @@ jobs:

steps:
- uses: actions/checkout@v2
env:
GITHUB_WORKSPACE: /
- name: Set up python
uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Run 'pr' target
run: make pr

alpine:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Run alpine integration tests
run: DISTRO=alpine make test-integ

amazonlinux:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Run amazonlinux integration tests
run: DISTRO=amazonlinux make test-integ

centos:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Run centos integration tests
run: DISTRO=centos make test-integ

debian:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Run debian integration tests
run: DISTRO=debian make test-integ

ubuntu:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Run ubuntu integration tests
run: DISTRO=ubuntu make test-integ
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ test-smoke: setup-codebuild-agent

.PHONY: test-integ
test-integ: setup-codebuild-agent
CODEBUILD_IMAGE_TAG=codebuild-agent tests/integration/codebuild-local/test_all.sh tests/integration/codebuild/.
CODEBUILD_IMAGE_TAG=codebuild-agent DISTRO="$(DISTRO)" tests/integration/codebuild-local/test_all.sh tests/integration/codebuild/.

.PHONY: check-security
check-security:
Expand All @@ -41,7 +41,9 @@ dev: init test

# Verifications to run before sending a pull request
.PHONY: pr
pr: init check-format check-security dev test-smoke
pr: init check-format check-security dev setup-codebuild-agent
CODEBUILD_IMAGE_TAG=codebuild-agent DISTRO="$(DISTRO)" tests/integration/codebuild-local/test_all.sh tests/integration/codebuild


.PHONY: clean
clean:
Expand Down
7 changes: 5 additions & 2 deletions tests/integration/codebuild-local/test_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ set -euo pipefail

CODEBUILD_IMAGE_TAG="${CODEBUILD_IMAGE_TAG:-al2/x86_64/standard/3.0}"
DRYRUN="${DRYRUN-0}"
DISTRO="${DISTRO:=""}"

function usage {
echo "usage: test_all.sh buildspec_yml_dir"
Expand Down Expand Up @@ -51,10 +52,12 @@ main() {
usage
exit 1
fi

BUILDSPEC_YML_DIR="$1"
echo $DISTRO $BUILDSPEC_YML_DIR
ls $BUILDSPEC_YML_DIR
HAS_YML=0
for f in "$BUILDSPEC_YML_DIR"/*.yml ; do
for f in "$BUILDSPEC_YML_DIR"/*"$DISTRO"*.yml ; do
[ -f "$f" ] || continue;
do_one_yaml "$f"
HAS_YML=1
Expand Down
1 change: 0 additions & 1 deletion tests/integration/codebuild/buildspec.os.alpine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ batch:
- "3.14"
- "3.15"
RUNTIME_VERSION:
- "3.7"
- "3.8"
- "3.9"
- "3.10"
Expand Down
1 change: 0 additions & 1 deletion tests/integration/codebuild/buildspec.os.centos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ batch:
DISTRO_VERSION:
- "7"
RUNTIME_VERSION:
- "3.7"
- "3.8"
- "3.9"
- "3.10"
Expand Down
1 change: 0 additions & 1 deletion tests/integration/codebuild/buildspec.os.debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ batch:
- "buster"
- "bullseye"
RUNTIME_VERSION:
- "3.7"
- "3.8"
- "3.9"
- "3.10"
Expand Down
1 change: 0 additions & 1 deletion tests/integration/codebuild/buildspec.os.ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ batch:
- "20.04"
- "22.04"
RUNTIME_VERSION:
- "3.7"
- "3.8"
- "3.9"
- "3.10"
Expand Down

0 comments on commit d5604d6

Please sign in to comment.