-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
2,349 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: AssertEquals | ||
description: Asserts that actual value equals expected value | ||
|
||
inputs: | ||
actual: | ||
description: "Value to assert" | ||
required: true | ||
|
||
expected: | ||
description: "Expected value" | ||
required: true | ||
|
||
message: | ||
description: "Message to display if assertion fails" | ||
required: false | ||
default: "Assertion failed" | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Assert | ||
id: assert | ||
shell: bash | ||
run: | | ||
actual="${{ inputs.actual }}" | ||
expected="${{ inputs.expected }}" | ||
message="${{ inputs.message }}" | ||
if [[ "$actual" != "$expected" ]]; then | ||
echo "$message. Expected: $expected, Actual: $actual" | ||
exit 1 | ||
fi | ||
branding: | ||
icon: "check-circle" | ||
color: "green" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,185 @@ | ||
name: E2E | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- reopened | ||
- synchronize | ||
|
||
jobs: | ||
e2e-default: | ||
runs-on: ubuntu-20.04 | ||
|
||
permissions: | ||
contents: read | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Test Run | ||
id: test-run | ||
uses: ./ | ||
with: | ||
owner: ovsds | ||
repo: push-version-tags-action | ||
tag_name: v1.0.0 | ||
|
||
- name: Assert exists | ||
uses: ./.github/actions/assert_equals | ||
with: | ||
actual: ${{ steps.test-run.outputs.exists }} | ||
expected: "true" | ||
|
||
- name: Assert tag name | ||
uses: ./.github/actions/assert_equals | ||
with: | ||
actual: ${{ steps.test-run.outputs.tag_name }} | ||
expected: "v1.0.0" | ||
|
||
- name: Assert tag sha | ||
uses: ./.github/actions/assert_equals | ||
with: | ||
actual: ${{ steps.test-run.outputs.tag_sha }} | ||
expected: "29ae696c9f5bdb8d25dc5dbfd3a88acb2af001f3" | ||
|
||
- name: Assert tag type | ||
uses: ./.github/actions/assert_equals | ||
with: | ||
actual: ${{ steps.test-run.outputs.tag_type }} | ||
expected: "commit" | ||
|
||
- name: Assert commit sha | ||
uses: ./.github/actions/assert_equals | ||
with: | ||
actual: ${{ steps.test-run.outputs.commit_sha }} | ||
expected: "29ae696c9f5bdb8d25dc5dbfd3a88acb2af001f3" | ||
|
||
- name: Assert tag message | ||
uses: ./.github/actions/assert_equals | ||
with: | ||
actual: ${{ steps.test-run.outputs.tag_message }} | ||
expected: "feat: init (#1)" | ||
|
||
- name: Assert verified | ||
uses: ./.github/actions/assert_equals | ||
with: | ||
actual: ${{ steps.test-run.outputs.verified }} | ||
expected: "true" | ||
|
||
e2e-unverified-commit-type: | ||
runs-on: ubuntu-20.04 | ||
|
||
permissions: | ||
contents: read | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Test Run | ||
id: test-run | ||
uses: ./ | ||
with: | ||
tag_name: unverified_tag | ||
|
||
- name: Assert exists | ||
uses: ./.github/actions/assert_equals | ||
with: | ||
actual: ${{ steps.test-run.outputs.exists }} | ||
expected: "true" | ||
|
||
- name: Assert tag name | ||
uses: ./.github/actions/assert_equals | ||
with: | ||
actual: ${{ steps.test-run.outputs.tag_name }} | ||
expected: "unverified_tag" | ||
|
||
- name: Assert tag sha | ||
uses: ./.github/actions/assert_equals | ||
with: | ||
actual: ${{ steps.test-run.outputs.tag_sha }} | ||
expected: "518c2e81cd748430d589f760efa3b0847d1e1c3d" | ||
|
||
- name: Assert tag type | ||
uses: ./.github/actions/assert_equals | ||
with: | ||
actual: ${{ steps.test-run.outputs.tag_type }} | ||
expected: "commit" | ||
|
||
- name: Assert commit sha | ||
uses: ./.github/actions/assert_equals | ||
with: | ||
actual: ${{ steps.test-run.outputs.commit_sha }} | ||
expected: "518c2e81cd748430d589f760efa3b0847d1e1c3d" | ||
|
||
- name: Assert tag message | ||
uses: ./.github/actions/assert_equals | ||
with: | ||
actual: ${{ steps.test-run.outputs.tag_message }} | ||
expected: "unverified_commit" | ||
|
||
- name: Assert verified | ||
uses: ./.github/actions/assert_equals | ||
with: | ||
actual: ${{ steps.test-run.outputs.verified }} | ||
expected: "false" | ||
|
||
e2e-not-exists: | ||
runs-on: ubuntu-20.04 | ||
|
||
permissions: | ||
contents: read | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Test Run | ||
id: test-run | ||
uses: ./ | ||
with: | ||
tag_name: definitely-not-a-tag | ||
|
||
- name: Assert exists | ||
uses: ./.github/actions/assert_equals | ||
with: | ||
actual: ${{ steps.test-run.outputs.exists }} | ||
expected: "false" | ||
|
||
- name: Assert tag name | ||
uses: ./.github/actions/assert_equals | ||
with: | ||
actual: ${{ steps.test-run.outputs.tag_name }} | ||
expected: "" | ||
|
||
- name: Assert tag sha | ||
uses: ./.github/actions/assert_equals | ||
with: | ||
actual: ${{ steps.test-run.outputs.tag_sha }} | ||
expected: "" | ||
|
||
- name: Assert tag type | ||
uses: ./.github/actions/assert_equals | ||
with: | ||
actual: ${{ steps.test-run.outputs.tag_type }} | ||
expected: "" | ||
|
||
- name: Assert commit sha | ||
uses: ./.github/actions/assert_equals | ||
with: | ||
actual: ${{ steps.test-run.outputs.commit_sha }} | ||
expected: "" | ||
|
||
- name: Assert tag message | ||
uses: ./.github/actions/assert_equals | ||
with: | ||
actual: ${{ steps.test-run.outputs.tag_message }} | ||
expected: "" | ||
|
||
- name: Assert verified | ||
uses: ./.github/actions/assert_equals | ||
with: | ||
actual: ${{ steps.test-run.outputs.verified }} | ||
expected: "" |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname $0)/.huskyrc" | ||
. "$(dirname $0)/_/husky.sh" | ||
|
||
npx --no -- commitlint --edit | ||
npx --no -- commitlint --edit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname $0)/.huskyrc" | ||
. "$(dirname $0)/_/husky.sh" | ||
|
||
npx lint-staged |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.