diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 0f63952..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,26 +0,0 @@ -# Golang CircleCI 2.0 configuration file -# -# Check https://circleci.com/docs/2.0/language-go/ for more details -version: 2 -jobs: - build: - docker: - # specify the version - - image: circleci/golang:1.9 - - # Specify service dependencies here if necessary - # CircleCI maintains a library of pre-built images - # documented at https://circleci.com/docs/2.0/circleci-images/ - # - image: circleci/postgres:9.4 - - #### TEMPLATE_NOTE: go expects specific checkout path representing url - #### expecting it in the form of - #### /go/src/github.com/circleci/go-tool - #### /go/src/bitbucket.org/circleci/go-tool - working_directory: /go/src/github.com/moltin/jsonapi - steps: - - checkout - - # specify any bash command here prefixed with `run: ` - - run: go get -v -t -d ./... - - run: go test -v ./... diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..a84e90e --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,35 @@ +name: CI/CD for the jsonapi + +on: + push: + pull_request: + branches: + - 'main' + +jobs: + # This job uses skip-duplicate-actions to skip one of the duplicate workflow runs when you push to a branch with an open PR. + check_duplicate_workflow: + needs: [] + runs-on: ubuntu-20.04 + outputs: + should_skip: ${{ steps.skip_check.outputs.should_skip }} + steps: + - id: skip_check + uses: fkirc/skip-duplicate-actions@v3.4.1 + with: + skip_after_successful_duplicate: 'true' + concurrent_skipping: 'same_content_newer' + do_not_skip: '["push"]' + + test: + needs: [check_duplicate_workflow] + runs-on: ubuntu-20.04 + container: golang:1.16.15 + if: ${{ needs.check_duplicate_workflow.outputs.should_skip != 'true' }} + steps: + - name: Check out repository code + uses: actions/checkout@v2 + - name: Run tests + run: | + go get -v -t -d ./... + go test -v ./... diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 6e73a06..0000000 --- a/.travis.yml +++ /dev/null @@ -1,13 +0,0 @@ -language: go -arch: - - amd64 - - ppc64le -go: - - 1.10.x - - 1.11.x - - 1.12.x - - 1.13.x - - 1.14.x - - 1.15.x - - tip -script: go test ./... -v