Skip to content
This repository has been archived by the owner on Nov 13, 2023. It is now read-only.

Commit

Permalink
ci: add testdata push/normal
Browse files Browse the repository at this point in the history
  • Loading branch information
suzuki-shunsuke committed Sep 23, 2022
1 parent 0a767a2 commit 14fd5cf
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 113 deletions.
113 changes: 0 additions & 113 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,89 +41,6 @@ jobs:
data: ${{toJSON(fromJSON(env.DATA).data)}}
- run: go run ./cmd/tester "$FILE"

# test-pull-request:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - uses: ./
# with:
# data: |
# {
# "event_name": "pull_request",
# "event": {
# "number": 149,
# "sender": {
# "login": "suzuki-shunsuke"
# },
# "repository": {
# "full_name": "gha-trigger/gha-trigger",
# "name": "gha-trigger",
# "owner": {
# "login": "gha-trigger"
# }
# },
# "pull_request": {
# "base": {
# "ref": "main"
# },
# "head": {
# "sha": "b6d8f3331c6845997b9408163a127e01fd32c120",
# "ref": "renovate/github.com-aws-aws-sdk-go-1.x"
# },
# "html_url": "https://github.com/gha-trigger/step-summary-action/pull/9"
# }
# },
# "pull_request": {
# "merge_commit_sha": "4528ea7ab7a8eef7e596097934a78eab90fb8b33",
# "base": {
# "ref": "main"
# },
# "head": {
# "sha": "b6d8f3331c6845997b9408163a127e01fd32c120",
# "ref": "renovate/github.com-aws-aws-sdk-go-1.x"
# },
# "html_url": "https://github.com/gha-trigger/step-summary-action/pull/9"
# }
# }
# - name: Test GHA_ACTOR
# run: |
# [ "$GHA_ACTOR" = suzuki-shunsuke ]
# - name: Test GHA_EVENT_NAME
# run: |
# [ "$GHA_EVENT_NAME" = pull_request ]
# - name: Test GHA_REPOSITORY
# run: |
# [ "$GHA_REPOSITORY" = gha-trigger/gha-trigger ]
# - name: Test GHA_REPOSITORY_OWNER
# run: |
# [ "$GHA_REPOSITORY_OWNER" = gha-trigger ]
# - name: Test GHA_REPOSITORY_NAME
# run: |
# [ "$GHA_REPOSITORY_NAME" = gha-trigger ]
# - name: Test GHA_SHA
# run: |
# [ "$GHA_SHA" = 4528ea7ab7a8eef7e596097934a78eab90fb8b33 ]
# - name: Test GHA_COMMIT_STATUS_SHA
# run: |
# [ "$GHA_COMMIT_STATUS_SHA" = b6d8f3331c6845997b9408163a127e01fd32c120 ]
# - name: Test GHA_BASE_REF
# run: |
# [ "$GHA_BASE_REF" = main ]
# - name: Test GHA_HEAD_SHA
# run: |
# [ "$GHA_HEAD_SHA" = b6d8f3331c6845997b9408163a127e01fd32c120 ]
# - name: Test GHA_REF
# run: |
# [ "$GHA_REF" = refs/pull/149/merge ]
# - name: Test GHA_REF_NAME
# run: |
# [ "$GHA_REF_NAME" = 149/merge ]
# - name: Test GHA_PULL_REQUEST_NUMBER
# run: |
# [ "$GHA_PULL_REQUEST_NUMBER" = 149 ]
# - name: Test GHA_ENV
# run: |
# [ -n "$GHA_ENV" ]
# test-push:
# runs-on: ubuntu-latest
# steps:
Expand All @@ -150,36 +67,6 @@ jobs:
# }
# }
# }
# - name: Test GHA_ACTOR
# run: |
# [ "$GHA_ACTOR" = suzuki-shunsuke ]
# - name: Test GHA_EVENT_NAME
# run: |
# [ "$GHA_EVENT_NAME" = push ]
# - name: Test GHA_REPOSITORY
# run: |
# [ "$GHA_REPOSITORY" = gha-trigger/gha-trigger ]
# - name: Test GHA_REPOSITORY_OWNER
# run: |
# [ "$GHA_REPOSITORY_OWNER" = gha-trigger ]
# - name: Test GHA_REPOSITORY_NAME
# run: |
# [ "$GHA_REPOSITORY_NAME" = gha-trigger ]
# - name: Test GHA_SHA
# run: |
# [ "$GHA_SHA" = a705bd6d8bc3882c983477cb3f20ab74ef8c24c2 ]
# - name: Test GHA_COMMIT_STATUS_SHA
# run: |
# [ "$GHA_COMMIT_STATUS_SHA" = a705bd6d8bc3882c983477cb3f20ab74ef8c24c2 ]
# - name: Test GHA_REF
# run: |
# [ "$GHA_REF" = refs/heads/renovate/github.com-aws-aws-sdk-go-1.x ]
# - name: Test GHA_REF_NAME
# run: |
# [ "$GHA_REF_NAME" = renovate/github.com-aws-aws-sdk-go-1.x ]
# - name: Test GHA_ENV
# run: |
# [ -n "$GHA_ENV" ]
# test-release:
# runs-on: ubuntu-latest
# steps:
Expand Down
24 changes: 24 additions & 0 deletions testdata/push/normal.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
envs:
GHA_ACTOR: suzuki-shunsuke
GHA_EVENT_NAME: push
GHA_REPOSITORY: gha-trigger/gha-trigger
GHA_REPOSITORY_OWNER: gha-trigger
GHA_REPOSITORY_NAME: gha-trigger
GHA_SHA: a705bd6d8bc3882c983477cb3f20ab74ef8c24c2
GHA_COMMIT_STATUS_SHA: a705bd6d8bc3882c983477cb3f20ab74ef8c24c2
GHA_REF: refs/heads/renovate/github.com-aws-aws-sdk-go-1.x
GHA_REF_NAME: renovate/github.com-aws-aws-sdk-go-1.x

data:
event_name: push
event:
ref: refs/heads/renovate/github.com-aws-aws-sdk-go-1.x
sender:
login: suzuki-shunsuke
head_commit:
id: a705bd6d8bc3882c983477cb3f20ab74ef8c24c2
repository:
full_name: gha-trigger/gha-trigger
name: gha-trigger
owner:
login: gha-trigger

0 comments on commit 14fd5cf

Please sign in to comment.