From 5c9f9431bcced61fa587cba828897462a399e0e8 Mon Sep 17 00:00:00 2001 From: Sanskar Jaiswal Date: Thu, 5 May 2022 19:17:01 +0530 Subject: [PATCH] Replace Travis CI with Github Actions Signed-off-by: Sanskar Jaiswal --- .github/workflows/tests.yaml | 49 ++++++++++++++++++++++++++++++++++++ .travis.yml | 7 ------ 2 files changed, 49 insertions(+), 7 deletions(-) create mode 100644 .github/workflows/tests.yaml delete mode 100644 .travis.yml diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml new file mode 100644 index 0000000..5e144aa --- /dev/null +++ b/.github/workflows/tests.yaml @@ -0,0 +1,49 @@ +name: tests + +on: + pull_request: + push: + branches: + - master + +permissions: + contents: read # for actions/checkout to fetch code + +jobs: + linux-amd64: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Setup Go + uses: actions/setup-go@v2 + with: + go-version: 1.17.x + - name: Restore Go cache + uses: actions/cache@v1 + with: + path: /home/runner/work/_temp/_github_home/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go- + - name: Run tests + run: make test + + darwin-amd64: + runs-on: macos-10.15 + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Setup Go + uses: actions/setup-go@v2 + with: + go-version: 1.17.x + - name: Restore Go cache + uses: actions/cache@v1 + with: + path: /home/runner/work/_temp/_github_home/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go- + - name: Run tests + run: make test diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 5418088..0000000 --- a/.travis.yml +++ /dev/null @@ -1,7 +0,0 @@ -language: go - -go: - - "1.13" - -script: - - make test