Skip to content

Commit

Permalink
Merge pull request #43 from WyriHaximus/add-unit-tests
Browse files Browse the repository at this point in the history
Add unit tests
  • Loading branch information
WyriHaximus authored Jan 1, 2023
2 parents 385a2a0 + b814ef2 commit b95747c
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
uses: therussiankid92/gat@v1
with:
assertion: should.equal
expected: v1
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/rm@v1.0.2
with:
path: .git/refs/tags
- name: Assert we got the tag with the expected prefix
uses: therussiankid92/gat@v1
with:
assertion: should.equal
expected: tag-with-prefix-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 b95747c

Please sign in to comment.