test for dbetabinom.R #14
Workflow file for this run
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
--- | |
name: Version check π | |
on: | |
push: | |
branches: | |
- main | |
- pre-release | |
pull_request: | |
types: | |
- opened | |
- synchronize | |
- reopened | |
- ready_for_review | |
branches: | |
- main | |
- pre-release | |
workflow_dispatch: | |
workflow_call: | |
concurrency: | |
group: version-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
version: | |
name: Version check π | |
runs-on: ubuntu-latest | |
if: > | |
!contains(github.event.commits[0].message, '[skip version]') | |
&& github.event.pull_request.draft == false | |
steps: | |
- name: Checkout repo π | |
uses: actions/checkout@v3 | |
- name: NEWS.md and DESCRIPTION Version check π | |
run: | | |
DESC_VERSION=$(awk -F: '/Version:/{gsub(/[ ]+/,"") ; print $2}' DESCRIPTION) | |
NEWS_VERSION=$(awk '/^#+ /{print $3; exit}' NEWS.md) | |
echo "NEWS.md version: $NEWS_VERSION" | |
echo "DESCRIPTION version: $DESC_VERSION" | |
if (test $DESC_VERSION = $NEWS_VERSION ); then | |
echo "NEWS.md and DESCRIPTION have the same version" | |
else | |
echo "π NEWS.md and DESCRIPTION have different versions!" | |
echo "π Please fix this." | |
exit 1 | |
fi | |
shell: bash |