Skip to content

Commit

Permalink
Merge pull request #78 from mlr-org/RaphaelS1-patch-1
Browse files Browse the repository at this point in the history
Update version-check.yml
  • Loading branch information
Raphael Sonabend authored Mar 18, 2021
2 parents 1dd161d + 077efd9 commit 608f28e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/rcmdcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,12 @@ jobs:
path: check

- name: Install covr
if: ${{ github.event_name == 'pull_request' }}
run: install.packages('covr')
shell: Rscript {0}

- name: Test coverage
if: ${{ github.event_name == 'pull_request' }}
run: covr::codecov()
shell: Rscript {0}

Expand Down
15 changes: 9 additions & 6 deletions .github/workflows/version-check.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
on:
pull_request:
branches: main

name: Version Check

jobs:
Expand All @@ -23,20 +23,23 @@ jobs:

steps:
- uses: actions/[email protected]

- name: New version
run: |
echo "NEW_VERSION=$(grep '^Version' DESCRIPTION | sed 's/.*: *//')" >> $GITHUB_ENV
- uses: actions/checkout@v2
with:
ref: main

- name: Old version
run: |
echo "OLD_VERSION=$(grep '^Version' DESCRIPTION | sed 's/.*: *//')" >> $GITHUB_ENV
- name: Compare versions
run: |
Rscript -e "if (commandArgs(TRUE)[1] <= commandArgs(TRUE)[2]) stop('Package version has not been updated.')" ${{ env.NEW_VERSION }} ${{ env.OLD_VERSION }}
- name: Check version format
run: |
Rscript -e "if (!grepl('^[0-9]*\\\.[0-9]*\\\.[0-9]*$', commandArgs(TRUE)[1])) stop('Format of package version must be major.minor.patch.')" ${{ env.NEW_VERSION }}
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: mlr3extralearners
Title: Extra Learners For mlr3
Version: 0.4.0
Version: 0.4.1
Authors@R:
c(person(given = "Raphael",
family = "Sonabend",
Expand Down

0 comments on commit 608f28e

Please sign in to comment.