Skip to content

Commit

Permalink
Add unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
WyriHaximus committed Jan 1, 2023
1 parent 385a2a0 commit d9592f4
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ jobs:
echo "Timestamp: ${{ steps.previoustag.outputs.timestamp }}"
test -n "${{ steps.previoustag.outputs.tag }}"
test -n "${{ steps.previoustag.outputs.timestamp }}"
- name: Assert we got the tag with the expected prefix
uses: therussiankid92/gat@v1
with:
assertion: should.equal
expected: v1.0.0
actual: ${{ steps.previoustag.outputs.tag }}
- name: Add tag with prefix
run: |
git tag tag-with-prefix-v1.0.0
Expand All @@ -44,6 +50,12 @@ jobs:
uses: JesseTG/[email protected]
with:
path: .git/refs/tags
- name: Assert we got the tag with the expected prefix
uses: therussiankid92/gat@v1
with:
assertion: should.equal
expected: v1.0.0
actual: ${{ steps.previoustagwithprefix.outputs.tag }}
- name: 'Get Previous tag with fallback'
id: previoustagwithfallback
uses: ./
Expand All @@ -54,3 +66,9 @@ jobs:
echo "Timestamp: ${{ steps.previoustagwithfallback.outputs.timestamp }}"
test -n "${{ steps.previoustagwithfallback.outputs.tag }}"
test -n "${{ steps.previoustagwithfallback.outputs.timestamp }}"
- name: Assert we got the fallback
uses: therussiankid92/gat@v1
with:
assertion: should.equal
expected: v1.0.0
actual: ${{ steps.previoustagwithfallback.outputs.tag }}

0 comments on commit d9592f4

Please sign in to comment.