From c5481d90595203c24c72973f1d2d4ce11508f516 Mon Sep 17 00:00:00 2001 From: Winni Neessen Date: Thu, 2 Feb 2023 10:16:46 +0100 Subject: [PATCH 1/4] Updated workflows to Go 1.20 --- .github/workflows/codecov.yml | 6 +++--- .github/workflows/golangci-lint.yml | 2 +- .github/workflows/sonarqube.yml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index bfab7c5..58040c0 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -33,7 +33,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, macos-latest, windows-latest] - go: [1.16, 1.17, 1.18, 1.19] + go: [1.16, 1.17, 1.18, 1.19, 1.20] steps: - name: Checkout Code uses: actions/checkout@master @@ -42,14 +42,14 @@ jobs: with: go-version: ${{ matrix.go }} - name: Install sendmail - if: matrix.go == 1.19 && matrix.os == 'ubuntu-latest' + if: matrix.go == 1.20 && matrix.os == 'ubuntu-latest' run: | sudo apt-get -y install sendmail; which sendmail - name: Run Tests run: | go test -v -race --coverprofile=coverage.coverprofile --covermode=atomic ./... - name: Upload coverage to Codecov - if: success() && matrix.go == 1.19 && matrix.os == 'ubuntu-latest' + if: success() && matrix.go == 1.20 && matrix.os == 'ubuntu-latest' uses: codecov/codecov-action@v2 with: token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index 2d0a327..d252128 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -21,7 +21,7 @@ jobs: steps: - uses: actions/setup-go@v3 with: - go-version: 1.19 + go-version: 1.20 - uses: actions/checkout@v3 - name: golangci-lint uses: golangci/golangci-lint-action@v3 diff --git a/.github/workflows/sonarqube.yml b/.github/workflows/sonarqube.yml index ac48cbb..08576e2 100644 --- a/.github/workflows/sonarqube.yml +++ b/.github/workflows/sonarqube.yml @@ -29,7 +29,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v3 with: - go-version: 1.19.x + go-version: 1.20.x - name: Run unit Tests run: | From f3119cd09821610dfbdf9df89a82b7b1c9ecbfe1 Mon Sep 17 00:00:00 2001 From: Winni Neessen Date: Thu, 2 Feb 2023 10:18:59 +0100 Subject: [PATCH 2/4] Added version compatibility statement --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index 212a346..52e1960 100644 --- a/README.md +++ b/README.md @@ -61,6 +61,15 @@ standard in a MUA. We aim for good GoDoc documenation in our library which gives you a full API reference. We also provide a more in-depth documentation website at [go-mail.dev](https://go-mail.dev) +## Compatibility + +Go is growing fast and providing great features with every new release. While we'd love to adopt the latest Go features +into our code, we realize that not everybody using this package can run the latest Go versions. Therefore we try to +implement alternative solutions for Go versions that do not support these features. Yet, the work needed to maintain +the separate versions is not to be underestimated. For that reason, we might retire that code at some point. +We guarantee that go-mail will always support the last four releases of Go. With two Go releases per year, this gives +the user a timeframe of two years to update to the next or even the latest version of Go. + ## Support We have a support and general discussion channel on Discord. Find us at: [#go-mail](https://discord.gg/dbfQyC4s) From fa0d51ec80801bdfa10db6a00342ad4c0c28c851 Mon Sep 17 00:00:00 2001 From: Winni Neessen Date: Thu, 2 Feb 2023 10:23:51 +0100 Subject: [PATCH 3/4] GH seems to interpret 1.20 as 1.2. Let's try if a string works --- .github/workflows/codecov.yml | 6 +++--- .github/workflows/golangci-lint.yml | 2 +- .github/workflows/sonarqube.yml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index 58040c0..39b0e0b 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -33,7 +33,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, macos-latest, windows-latest] - go: [1.16, 1.17, 1.18, 1.19, 1.20] + go: [1.16, 1.17, 1.18, 1.19, '1.20'] steps: - name: Checkout Code uses: actions/checkout@master @@ -42,14 +42,14 @@ jobs: with: go-version: ${{ matrix.go }} - name: Install sendmail - if: matrix.go == 1.20 && matrix.os == 'ubuntu-latest' + if: matrix.go == '1.20' && matrix.os == 'ubuntu-latest' run: | sudo apt-get -y install sendmail; which sendmail - name: Run Tests run: | go test -v -race --coverprofile=coverage.coverprofile --covermode=atomic ./... - name: Upload coverage to Codecov - if: success() && matrix.go == 1.20 && matrix.os == 'ubuntu-latest' + if: success() && matrix.go == '1.20' && matrix.os == 'ubuntu-latest' uses: codecov/codecov-action@v2 with: token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index d252128..7183a6d 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -21,7 +21,7 @@ jobs: steps: - uses: actions/setup-go@v3 with: - go-version: 1.20 + go-version: '1.20' - uses: actions/checkout@v3 - name: golangci-lint uses: golangci/golangci-lint-action@v3 diff --git a/.github/workflows/sonarqube.yml b/.github/workflows/sonarqube.yml index 08576e2..19fb69c 100644 --- a/.github/workflows/sonarqube.yml +++ b/.github/workflows/sonarqube.yml @@ -29,7 +29,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v3 with: - go-version: 1.20.x + go-version: '1.20.x' - name: Run unit Tests run: | From 0dca1491db5275003ab1fa2852d2a115b3a98935 Mon Sep 17 00:00:00 2001 From: Winni Neessen Date: Thu, 2 Feb 2023 10:26:11 +0100 Subject: [PATCH 4/4] Looks like golangci-lint does not support 1.20 yet --- .github/workflows/golangci-lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index 7183a6d..48f26d7 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -21,7 +21,7 @@ jobs: steps: - uses: actions/setup-go@v3 with: - go-version: '1.20' + go-version: '1.19' - uses: actions/checkout@v3 - name: golangci-lint uses: golangci/golangci-lint-action@v3