From d554b9b87ace9c276d452e5d9f71063fc3e13cee Mon Sep 17 00:00:00 2001 From: Sascha Mann Date: Fri, 18 Feb 2022 11:41:37 +0100 Subject: [PATCH] CI: Migrate to GHA (#1021) * CI: Migrate to GHA * Rename .travis.gofmt.sh to .gha.gofmt.sh * Delete .travis.yml * Delete appveyor.yml * Add caching * Test caching * Revert "Add caching" This reverts commit 0beee421e710916eab35c504690b07c1ab1e811c. --- .travis.gofmt.sh => .gha.gofmt.sh | 0 .github/workflows/ci.yml | 43 +++++++++++++++++++++++++++++++ .travis.yml | 15 ----------- appveyor.yml | 20 -------------- 4 files changed, 43 insertions(+), 35 deletions(-) rename .travis.gofmt.sh => .gha.gofmt.sh (100%) create mode 100644 .github/workflows/ci.yml delete mode 100644 .travis.yml delete mode 100644 appveyor.yml diff --git a/.travis.gofmt.sh b/.gha.gofmt.sh similarity index 100% rename from .travis.gofmt.sh rename to .gha.gofmt.sh diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 000000000..890af0c5d --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,43 @@ +name: CI + +on: + workflow_dispatch: + push: + branches: + - main + pull_request: + +permissions: + contents: read + +jobs: + tests: + name: Go ${{ matrix.go-version }} - ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + go-version: ["1.15"] + os: [ubuntu-latest, windows-latest, macOS-latest] + + steps: + - uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f + + - uses: actions/setup-go@bfdd3570ce990073878bf10f6b2d79082de49492 + with: + go-version: ${{ matrix.go-version }} + + - name: Run Tests + run: | + go test -cover ./... + shell: bash + + formatting: + name: Go Format + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f + + - name: Check formatting + run: ./.gha.gofmt.sh diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index a195a1099..000000000 --- a/.travis.yml +++ /dev/null @@ -1,15 +0,0 @@ -language: go - -sudo: false - -go: - - "1.15.x" - - tip - -matrix: - allow_failures: - - go: tip - -script: - - ./.travis.gofmt.sh - - go test -cover ./... diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index 114035734..000000000 --- a/appveyor.yml +++ /dev/null @@ -1,20 +0,0 @@ ---- -version: "{build}" - -clone_folder: c:\gopath\src\github.com\exercism\cli - -environment: - GOPATH: c:\gopath - GO111MODULE: on - -init: - - git config --global core.autocrlf input - -install: - - echo %PATH% - - echo %GOPATH% - - go version - - go env - -build_script: - - go test -cover ./...