Skip to content

Makes the github PR workflow test against all OSes #154

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 19, 2024
Merged
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
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
Comment on lines +17 to +56
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was pulled directly from the nodejs ric.

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/.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pulled from nodejs ric, with some modification on the test path.


.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
Comment on lines +57 to +58
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: this isn't necessary, will remove later.

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
Loading