Check multiple ACT-OTN matches #140
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
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 5 * * *' | |
name: Check multiple ACT-OTN matches | |
jobs: | |
check_it: | |
runs-on: ubuntu-latest | |
env: | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
MATOS_USER: ${{ secrets.MATOS_USERNAME }} | |
MATOS_PASS: ${{ secrets.MATOS_PASSWORD }} | |
steps: | |
- name: Check out GH repository | |
uses: actions/checkout@v4 | |
- name: Set up R | |
uses: r-lib/actions/setup-r@v2 | |
with: | |
use-public-rspm: true | |
- name: Install packages | |
uses: r-lib/actions/setup-r-dependencies@v2 | |
with: | |
extra-packages: any::testthat | |
- name: Check for multimatch | |
id: multi-test | |
continue-on-error: true | |
shell: Rscript {0} | |
run: | | |
testthat::test_that('No multimatch', | |
{testthat::expect_no_warning(matos::list_projects())}) | |
- name: Show multimatches | |
if: steps.multi-test.outcome == 'failure' | |
shell: Rscript {0} | |
run: | | |
hold <- matos::list_projects() | |
hold[duplicated(hold$name) | duplicated(hold$name, fromLast = TRUE),] | |