From f5b21620b125d4cf54cd349cb8613741a6baa69d Mon Sep 17 00:00:00 2001 From: Erik Osterman Date: Tue, 9 Jun 2020 17:59:25 -0700 Subject: [PATCH] use github status updater (#38) * use github status updater * workaround * use rusn syntax * use with * use with * use with * update sha * use arg * hack the context * hack the context * dispatch commands to actions * move reactions to upstream --- .github/workflows/chatops.yml | 8 +-- .github/workflows/test.yml | 112 ---------------------------------- 2 files changed, 2 insertions(+), 118 deletions(-) delete mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/chatops.yml b/.github/workflows/chatops.yml index 83b54f62..a6bb11b4 100644 --- a/.github/workflows/chatops.yml +++ b/.github/workflows/chatops.yml @@ -28,14 +28,10 @@ jobs: with: token: ${{ secrets.PUBLIC_REPO_ACCESS_TOKEN }} reaction-token: ${{ secrets.GITHUB_TOKEN }} + repository: cloudposse/actions commands: test permission: none issue-type: pull-request reactions: false - - name: "Add reaction" - uses: cloudposse/actions/github/create-or-update-comment@0.15.0 - with: - comment-id: ${{ github.event.comment.id }} - token: ${{ secrets.GITHUB_TOKEN }} - reaction-type: "+1" + diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index 54d0fc53..00000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,112 +0,0 @@ -name: test -on: - push: - branches: - - master - pull_request: - types: [opened, synchronize, reopened] - repository_dispatch: - types: [test-command] - -jobs: - readme: - runs-on: ubuntu-latest - container: cloudposse/testing.cloudposse.co:latest - env: - PATH: "/usr/local/terraform/0.12/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" - MAKE_INCLUDES: Makefile - steps: - - # Checkout the code from GitHub the default way - - name: "Checkout code (default)" - uses: actions/checkout@v2 - if: ${{ github.event_name != 'repository_dispatch' }} - - # Checkout the code from GitHub Pull Request - - name: "Checkout code for ChatOps" - uses: actions/checkout@v2 - if: ${{ github.event_name == 'repository_dispatch' }} - with: - token: ${{ secrets.PUBLIC_REPO_ACCESS_TOKEN }} - repository: ${{ github.event.pull_request.head.repo.full_name }} - ref: ${{ github.event.pull_request.head.ref }} - - # Initialize the build-harness with make target helpers - - name: "Initialize build-harness" - env: - BUILD_HARNESS_BRANCH: master - run: make init - - # Run the bats tests from the test-harness against the module - - name: "Test that README.md was generated from README.yaml" - run: make readme/lint - - bats: - runs-on: ubuntu-latest - container: cloudposse/testing.cloudposse.co:latest - env: - PATH: "/usr/local/terraform/0.12/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" - MAKE_INCLUDES: Makefile - steps: - - # Checkout the code from GitHub the default way - - name: "Checkout code (default)" - uses: actions/checkout@v2 - if: ${{ github.event_name != 'repository_dispatch' }} - - # Checkout the code from GitHub Pull Request - - name: "Checkout code for ChatOps" - uses: actions/checkout@v2 - if: ${{ github.event_name == 'repository_dispatch' }} - with: - token: ${{ secrets.PUBLIC_REPO_ACCESS_TOKEN }} - repository: ${{ github.event.pull_request.head.repo.full_name }} - ref: ${{ github.event.pull_request.head.ref }} - - # Initialize the test-harness which has a library of bats tests - - name: "Initialize test-harness" - env: - TEST_HARNESS_BRANCH: master - run: make -C test/ clean init - - # Run the bats tests from the test-harness against the module - - name: "Test module with bats" - run: make -C test/ module - - # Run the bats tests from the test-harness against the example - - name: "Test `examples/complete` with bats" - run: make -C test/ examples/complete - - terratest: - runs-on: ubuntu-latest - container: cloudposse/testing.cloudposse.co:latest - env: - PATH: "/usr/local/terraform/0.12/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" - MAKE_INCLUDES: Makefile - steps: - - # Checkout the code from GitHub the default way - - name: "Checkout code (default)" - uses: actions/checkout@v2 - if: ${{ github.event_name != 'repository_dispatch' }} - - # Checkout the code from GitHub Pull Request - - name: "Checkout code for ChatOps" - uses: actions/checkout@v2 - if: ${{ github.event_name == 'repository_dispatch' }} - with: - token: ${{ secrets.PUBLIC_REPO_ACCESS_TOKEN }} - repository: ${{ github.event.pull_request.head.repo.full_name }} - ref: ${{ github.event.pull_request.head.ref }} - - - # Initialize the terratest go project - - name: "Initialize terratest go project" - run: make -C test/src clean init - - # Run the terratest integration tests - - name: "Test `examples/complete` with terratest" - run: make -C test/src - env: - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - AWS_SECRET_KEY: ${{ secrets.AWS_SECRET_KEY }}