11# =============================================================================
2- # Unit Tests on Go v1.15, 16, 17 and latest
2+ # Unit Tests on Go v1.16, 17 and latest
33# =============================================================================
44# This Workflow runs unit tests on various Go versions over Docker on any push.
55#
66# This action caches the built Docker image for a day unless any change was made
77# in the go.mod or Dockerfile.
8- name : Go 1.15~latest
8+ #
9+ # Due to the use of "embed" module, the Go 1.15 check is deprecated.
10+ name : Go 1.16~latest
911
1012on :
1113 workflow_dispatch :
4345 - name : Load Docker images if exist
4446 if : steps.cache.outputs.cache-hit == 'true'
4547 run : |
46- docker load --input ${{ steps.imagetag.outputs.PATH_TAR }}/github_v1_15_1.tar
4748 docker load --input ${{ steps.imagetag.outputs.PATH_TAR }}/github_v1_16_1.tar
4849 docker load --input ${{ steps.imagetag.outputs.PATH_TAR }}/github_v1_17_1.tar
4950 docker load --input ${{ steps.imagetag.outputs.PATH_TAR }}/github_latest_1.tar
5354 if : steps.cache.outputs.cache-hit != 'true'
5455 run : |
5556 : # Pull images one-by-one for stability
56- docker pull golang:1.15-alpine
5757 docker pull golang:1.16-alpine
5858 docker pull golang:1.17-alpine
5959 docker pull golang:alpine
@@ -69,14 +69,11 @@ jobs:
6969 - name : Save built images if no-exists
7070 if : steps.cache.outputs.cache-hit != 'true'
7171 run : |
72- docker save --output ${{ steps.imagetag.outputs.PATH_TAR }}/github_v1_15_1.tar github_v1_15:latest
7372 docker save --output ${{ steps.imagetag.outputs.PATH_TAR }}/github_v1_16_1.tar github_v1_16:latest
7473 docker save --output ${{ steps.imagetag.outputs.PATH_TAR }}/github_v1_17_1.tar github_v1_17:latest
7574 docker save --output ${{ steps.imagetag.outputs.PATH_TAR }}/github_latest_1.tar github_latest:latest
7675 docker save --output ${{ steps.imagetag.outputs.PATH_TAR }}/github_mergeability_1.tar github_mergeability:latest
7776
78- - name : Run tests on Go 1.15
79- run : docker-compose --file ./.github/docker-compose.yml up --abort-on-container-exit v1_15
8077 - name : Run tests on Go 1.16
8178 run : docker-compose --file ./.github/docker-compose.yml up --abort-on-container-exit v1_16
8279 - name : Run tests on Go 1.17
0 commit comments