diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..ceb0ed1 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,26 @@ +name: CI/CD Pipeline + +on: push + +env: + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + +jobs: + pre-commit: + runs-on: ubuntu-latest + name: Static Analysis + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Run pre-commit + run: make test/pre-commit + + unit-tests: + runs-on: ubuntu-latest + name: Unit Tests + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Run Unit Tests + run: make test/unit-tests diff --git a/.semaphore/semaphore.yml b/.semaphore/semaphore.yml deleted file mode 100644 index 087e93c..0000000 --- a/.semaphore/semaphore.yml +++ /dev/null @@ -1,24 +0,0 @@ -version: v1.0 -name: "CI/CD Pipeline" -agent: - machine: - type: e1-standard-2 - os_image: ubuntu1804 - -global_job_config: - secrets: - - name: TERRAFORM_AWS_TESTACCOUNT_CREDENTIALS - prologue: - commands: - - checkout --use-cache - -blocks: - - name: "Tests" - task: - jobs: - - name: "Pre Commit Hooks" - commands: - - make test/pre-commit - - name: "Unit Tests" - commands: - - make test/unit-tests diff --git a/README.md b/README.md index e378367..e15b98a 100644 --- a/README.md +++ b/README.md @@ -233,13 +233,13 @@ Copyright © 2020 [Mineiros GmbH][homepage] [homepage]: https://mineiros.io/?ref=terraform-aws-iam-user [hello@mineiros.io]: mailto:hello@mineiros.io -[badge-build]: https://mineiros.semaphoreci.com/badges/terraform-aws-iam-user/branches/master.svg?style=shields&key=e7037b28-8872-4dff-8ce1-484d8a971e8a +[badge-build]: https://github.com/mineiros-io/terraform-aws-iam-user/workflows/CI/CD%20Pipeline/badge.svg [badge-semver]: https://img.shields.io/github/v/tag/mineiros-io/terraform-aws-iam-user.svg?label=latest&sort=semver [badge-license]: https://img.shields.io/badge/license-Apache%202.0-brightgreen.svg [badge-terraform]: https://img.shields.io/badge/terraform-0.13%20and%200.12.20+-623CE4.svg?logo=terraform [badge-slack]: https://img.shields.io/badge/slack-@mineiros--community-f32752.svg?logo=slack -[build-status]: https://mineiros.semaphoreci.com/projects/terraform-aws-iam-user +[build-status]: https://github.com/mineiros-io/terraform-aws-iam-user/actions [releases-github]: https://github.com/mineiros-io/terraform-aws-iam-user/releases [releases-terraform]: https://github.com/hashicorp/terraform/releases [apache20]: https://opensource.org/licenses/Apache-2.0