-
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.
* feat: init from template * feat: initial
- Loading branch information
Showing
18 changed files
with
2,620 additions
and
1 deletion.
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,13 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
indent_size = 2 | ||
indent_style = space | ||
insert_final_newline = true | ||
max_line_length = 120 | ||
trim_trailing_whitespace = true | ||
|
||
[*.sh] | ||
indent_size = 4 |
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,16 @@ | ||
name: "Setup Environment" | ||
description: "Setting environment for the project" | ||
|
||
inputs: | ||
task-version: | ||
description: "Task version" | ||
required: true | ||
default: "3.33.1" | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Install Task | ||
uses: arduino/setup-task@v1 | ||
with: | ||
version: ${{ inputs.task-version }} |
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,30 @@ | ||
name: Check PR | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- reopened | ||
- synchronize | ||
|
||
jobs: | ||
check-pr: | ||
runs-on: ubuntu-20.04 | ||
|
||
permissions: | ||
contents: read | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Environment | ||
uses: ./.github/actions/setup_environment | ||
|
||
- name: Install Dependencies | ||
run: | | ||
task ci-init | ||
- name: Lint PR | ||
run: | | ||
task lint |
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 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,18 @@ | ||
name: Push version tags | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
push-version-tags: | ||
runs-on: ubuntu-20.04 | ||
|
||
permissions: | ||
contents: write | ||
|
||
steps: | ||
- name: Push Version Tags | ||
uses: ovsds/push-version-tags-action@v1 | ||
with: | ||
version: ${{ github.event.release.tag_name }} |
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,9 @@ | ||
# OS | ||
.DS_Store | ||
|
||
# IDE | ||
.idea/ | ||
.vscode/ | ||
|
||
# Dependencies | ||
node_modules/ |
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 @@ | ||
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
fund=false | ||
audit=false | ||
save-exact=true | ||
unsafe-perm=true | ||
engine-strict=true | ||
update-notifier=false |
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 @@ | ||
v21.5.0 |
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,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2024 Dmitry Ovsiannikov | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
Oops, something went wrong.