Skip to content

Commit

Permalink
Add testing for use_api
Browse files Browse the repository at this point in the history
  • Loading branch information
ps-jay committed Oct 18, 2023
1 parent de5ab04 commit cb4540d
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/test-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,36 @@ jobs:
- name: Test
run: bats tests/*.bats

test-api:
runs-on: ubuntu-latest
steps:
- name: Test lookup version (with API)
id: version-lookup
env:
use_api: 'true'
run: ./version-lookup.sh

- name: Check lookup result
shell: bash
run: '[[ -n "${{ steps.version-lookup.outputs.CURRENT_VERSION }}" ]]'

- name: Test increment version (with API)
id: version-increment
run: ./version-increment.sh
env:
current_version: ${{ steps.version-lookup.outputs.CURRENT_VERSION }}
scheme: calver
use_api: 'true'

- name: Check increment result
shell: bash
run: '[[ "$(date +%Y.%m)" ~= "$(echo "${{ steps.version-increment.outputs.VERSION }}" | cut -d "." -f 1-2)" ]]'

release:
needs:
- lint
- test
- test-api
runs-on: ubuntu-latest
steps:
- name: Checkout code
Expand Down

0 comments on commit cb4540d

Please sign in to comment.