Skip to content

Commit

Permalink
test: setup test matrix
Browse files Browse the repository at this point in the history
Run tests on using all combinations of minimum and maximum versions of
Python3 and OpenJDK.

Minimum supported versions:

- Python3: most recent patched version of 3.0.
- OpenJDK: most recent patched version of 11.

Maximum supported versions:

- Python3: most recent stable release.
- OpenJDK: most recent stable release.

---

Closes #64
Closes #63
  • Loading branch information
StoneyJackson committed Nov 3, 2023
1 parent 7de5505 commit e1184e9
Show file tree
Hide file tree
Showing 5 changed files with 100 additions and 2 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/test-with-max-python-max-java.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
name: Test

on:
pull_request:

jobs:
build:
name: Test
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Build test image
uses: docker/build-push-action@v4
with:
context: .
file: ./shell/Dockerfile
tags: test-image:latest
push: false
build-args:
- PYTHON3_VERSION=""
- OPENJDK_VERSION=""
-
name: Test
uses: addnab/docker-run-action@v3
with:
image: test-image:latest
run: /plcc/tests/run
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ jobs:
file: ./shell/Dockerfile
tags: test-image:latest
push: false
build-args:
- PYTHON3_VERSION=""
- OPENJDK_VERSION="~=11"
-
name: Test
uses: addnab/docker-run-action@v3
Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/test-with-min-python-max-java.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
name: Test

on:
pull_request:

jobs:
build:
name: Test
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Build test image
uses: docker/build-push-action@v4
with:
context: .
file: ./shell/Dockerfile
tags: test-image:latest
push: false
build-args:
- PYTHON3_VERSION="~=3.0.0"
- OPENJDK_VERSION=""
-
name: Test
uses: addnab/docker-run-action@v3
with:
image: test-image:latest
run: /plcc/tests/run
31 changes: 31 additions & 0 deletions .github/workflows/test-with-min-python-min-java.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
name: Test

on:
pull_request:

jobs:
build:
name: Test
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Build test image
uses: docker/build-push-action@v4
with:
context: .
file: ./shell/Dockerfile
tags: test-image:latest
push: false
build-args:
- PYTHON3_VERSION="~=3.0.0"
- OPENJDK_VERSION="~=11"
-
name: Test
uses: addnab/docker-run-action@v3
with:
image: test-image:latest
run: /plcc/tests/run
6 changes: 4 additions & 2 deletions shell/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
FROM alpine:3

# Install Python 3
RUN apk add --no-cache python3~=3 \
ARG PYTHON3_VERSION=""
RUN apk add --no-cache "python3${PYTHON3_VERSION}" \
&& python3 -m ensurepip \
&& pip3 install --upgrade pip setuptools \
&& rm -r /usr/lib/python*/ensurepip \
Expand All @@ -14,7 +15,8 @@ RUN apk add --no-cache python3~=3 \
&& rm -r /root/.cache

# Install JDK
RUN apk add --no-cache openjdk17-jdk~=17
ARG OPENJDK_VERSION=""
RUN apk add --no-cache "openjdk17-jdk${OPENJDK_VERSION}"
RUN which java
ENV JAVA_HOME="/usr/lib/jvm/default-jvm"
ENV PATH="${JAVA_HOME}/bin:${PATH}"
Expand Down

0 comments on commit e1184e9

Please sign in to comment.