diff --git a/.github/workflows/test-on-push-and-pr.yml b/.github/workflows/test-on-push-and-pr.yml index 9c5e228..ddd8784 100644 --- a/.github/workflows/test-on-push-and-pr.yml +++ b/.github/workflows/test-on-push-and-pr.yml @@ -18,3 +18,63 @@ jobs: node-version: '16' - name: Run 'pr' target run: make pr + + alpine: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up node + uses: actions/setup-node@v1 + with: + node-version: '16' + - name: Run alpine integration tests + run: DISTRO=alpine make test-integ + + amazonlinux: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up node + uses: actions/setup-node@v1 + with: + node-version: '16' + - name: Run amazonlinux integration tests + run: DISTRO=amazonlinux make test-integ + + centos: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up node + uses: actions/setup-node@v1 + with: + node-version: '16' + - name: Run centos integration tests + run: DISTRO=centos make test-integ + + debian: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up node + uses: actions/setup-node@v1 + with: + node-version: '16' + - name: Run debian integration tests + run: DISTRO=debian make test-integ + + ubuntu: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up node + uses: actions/setup-node@v1 + with: + node-version: '16' + - name: Run ubuntu integration tests + run: DISTRO=ubuntu make test-integ \ No newline at end of file diff --git a/Makefile b/Makefile index 5a59942..9ff17f7 100644 --- a/Makefile +++ b/Makefile @@ -15,7 +15,7 @@ test-smoke: setup-codebuild-agent CODEBUILD_IMAGE_TAG=codebuild-agent test/integration/codebuild-local/test_one.sh test/integration/codebuild/buildspec.os.alpine.1.yml alpine 3.16 18 test-integ: setup-codebuild-agent - CODEBUILD_IMAGE_TAG=codebuild-agent test/integration/codebuild-local/test_all.sh test/integration/codebuild + CODEBUILD_IMAGE_TAG=codebuild-agent DISTRO="$(DISTRO)" test/integration/codebuild-local/test_all.sh test/integration/codebuild copy-files: npm run copy-files diff --git a/test/integration/codebuild-local/test_all.sh b/test/integration/codebuild-local/test_all.sh index 0c5168c..a911db5 100755 --- a/test/integration/codebuild-local/test_all.sh +++ b/test/integration/codebuild-local/test_all.sh @@ -4,6 +4,7 @@ set -euo pipefail CODEBUILD_IMAGE_TAG="${CODEBUILD_IMAGE_TAG:-al2/x86_64/standard/3.0}" +DISTRO="${DISTRO:=""}" DRYRUN="${DRYRUN-0}" function usage { @@ -54,7 +55,7 @@ main() { BUILDSPEC_YML_DIR="$1" 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