Skip to content

Commit

Permalink
Merge pull request #12 from sergeyklay/feature/bump-version
Browse files Browse the repository at this point in the history
Run backward compatibility check for non-main branches
  • Loading branch information
sergeyklay authored Feb 13, 2023
2 parents fb2f60e + ad52054 commit 61fd679
Show file tree
Hide file tree
Showing 3 changed files with 601 additions and 971 deletions.
24 changes: 20 additions & 4 deletions .github/workflows/contracts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,23 @@ jobs:
# Number of commits to fetch. 0 indicates all history for all branches and tags.
fetch-depth: 0

- name: Create-main-branch
- name: Detect current branch
id: current-branch
run: |
if [ "${{ github.head_ref }}" != "" ]; then
ref="${{ github.head_ref }}"
else
ref="${{ github.ref }}"
fi
prefix="refs/heads/"
branch=${ref#"$prefix"}
echo "ref=$branch" >> $GITHUB_OUTPUT
shell: bash

- name: Setup tracking for main branch
if: steps.current-branch.outputs.ref != 'main'
run: git branch --track main origin/main

- name: Set up Python 3.11
Expand Down Expand Up @@ -78,6 +94,6 @@ jobs:
- name: Test specification
run: specmatic test --testBaseURL=http://127.0.0.1:5000

# - name: Run backward compatibility check on changed files
# if: matrix.os != 'windows-latest'
# run: specmatic compatible git commits contracts/documentation.yaml main HEAD
- name: Run backward compatibility check on changed files
if: matrix.os != 'windows-latest' && steps.current-branch.outputs.ref != 'main'
run: specmatic compatible git commits contracts/documentation.yaml main HEAD
Loading

0 comments on commit 61fd679

Please sign in to comment.