diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 939d4d40..00000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,63 +0,0 @@ -version: 2 - -workflows: - version: 2 - release: - jobs: - - build: - filters: - tags: - only: /^v.*/ - branches: - ignore: /.*/ - - test: - filters: - tags: - only: /^v.*/ - branches: - ignore: /.*/ - build: - jobs: - - build - - test -jobs: - build: - docker: - - image: circleci/golang:1.16 - steps: - - checkout - - - run: - name: Build - command: make release - no_output_timeout: 30m - - - persist_to_workspace: - root: . - paths: - - artifacts - - test: - docker: - - image: circleci/golang:1.16 - - image: fourplusone/docker-atlas:jira-latest - - steps: - - checkout - - - run: - name: Wait for JIRA - command: | - while : - do - curl http://localhost:2990/jira && break; - sleep 10 - done - - run: - name: Testing - environment: - JIRA_URL: http://localhost:2990/jira/ - JIRA_USER: admin - JIRA_PASSWORD: admin - command: | - make test diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 2e75cd04..13340339 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -1,8 +1,8 @@ -name: Go +name: Build & Tests on: push: - branches: [ master ] + branches: [ master, ci-testing ] pull_request: branches: [ master ] @@ -17,4 +17,29 @@ jobs: with: go-version: 1.18 - name: Build - run: make + run: make build + test: + services: + jira: + image: docker.pkg.github.com/fourplusone/docker-atlas/jira:latest + options: --tty --health-start-period=10m + credentials: + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + ports: + - 2990:2990 + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.18 + + - name: Test + env: + JIRA_URL: http://localhost:2990/jira/ + JIRA_USER: admin + JIRA_PASSWORD: admin + run: make test diff --git a/README.md b/README.md index 8b9d3b15..3cda6bd2 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # terraform-provider-jira +[![Build & Tests](https://github.com/fourplusone/terraform-provider-jira/actions/workflows/go.yml/badge.svg)](https://github.com/fourplusone/terraform-provider-jira/actions/workflows/go.yml) + Terraform Provider for managing JIRA. (__[View on registry.terraform.io](https://registry.terraform.io/providers/fourplusone/jira/latest)__) ## Data Sources