diff --git a/Makefile b/Makefile index dc0d3fb..1b87fd3 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,28 @@ fmt: swift-format format -i -r -p Sources Package.swift -.PHONY: fmt +test: + swift test + +test-linux-swift508: + docker compose run --rm --build swift508 + +test-linux-swift509: + docker compose run --rm --build swift509 + +test-linux-swift510: + docker compose run --rm --build swift510 + +test-linux-swift600: + docker compose run --rm --build swift600 + +test-linux-all: + docker compose run --rm --build + +.PHONY: fmt \ + test \ + test-linux-swift508 \ + test-linux-swift509 \ + test-linux-swift510 \ + test-linux-swift600 \ + test-linux-all diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..8afe2c6 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,31 @@ +version: '3.7' + +name: linux-tests +services: + swift508: + build: + context: . + dockerfile: swift508.Dockerfile + working_dir: /app + entrypoint: swift test + + swift509: + build: + context: . + dockerfile: swift509.Dockerfile + working_dir: /app + entrypoint: swift test + + swift510: + build: + context: . + dockerfile: swift510.Dockerfile + working_dir: /app + entrypoint: swift test + + swift600: + build: + context: . + dockerfile: swift600.Dockerfile + working_dir: /app + entrypoint: swift test diff --git a/swift508.Dockerfile b/swift508.Dockerfile new file mode 100644 index 0000000..f4892c3 --- /dev/null +++ b/swift508.Dockerfile @@ -0,0 +1,13 @@ +FROM swift:5.8 + +WORKDIR /app + +COPY Package.* ./ + +RUN swift package resolve --skip-update \ + $([ -f ./Package.resolved ] && echo "--force-resolved-versions" || true) + +COPY ./Plugins ./Plugins +COPY ./Sources ./Sources +COPY ./Tests ./Tests + diff --git a/swift509.Dockerfile b/swift509.Dockerfile new file mode 100644 index 0000000..6f29bac --- /dev/null +++ b/swift509.Dockerfile @@ -0,0 +1,13 @@ +FROM swift:5.9 + +WORKDIR /app + +COPY Package.* ./ + +RUN swift package resolve --skip-update \ + $([ -f ./Package.resolved ] && echo "--force-resolved-versions" || true) + +COPY ./Plugins ./Plugins +COPY ./Sources ./Sources +COPY ./Tests ./Tests + diff --git a/swift510.Dockerfile b/swift510.Dockerfile new file mode 100644 index 0000000..f223707 --- /dev/null +++ b/swift510.Dockerfile @@ -0,0 +1,13 @@ +FROM swift:5.10 + +WORKDIR /app + +COPY Package.* ./ + +RUN swift package resolve --skip-update \ + $([ -f ./Package.resolved ] && echo "--force-resolved-versions" || true) + +COPY ./Plugins ./Plugins +COPY ./Sources ./Sources +COPY ./Tests ./Tests + diff --git a/swift600.Dockerfile b/swift600.Dockerfile new file mode 100644 index 0000000..cdafc19 --- /dev/null +++ b/swift600.Dockerfile @@ -0,0 +1,13 @@ +FROM swift:6.0 + +WORKDIR /app + +COPY Package.* ./ + +RUN swift package resolve --skip-update \ + $([ -f ./Package.resolved ] && echo "--force-resolved-versions" || true) + +COPY ./Plugins ./Plugins +COPY ./Sources ./Sources +COPY ./Tests ./Tests +