Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
109 changes: 109 additions & 0 deletions .github/workflows/reverse-dependency-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
name: Reverse dependency checks

on:
workflow_dispatch:
push:
pull_request:

permissions:
contents: read

concurrency:
group: reverse-deps-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
reverse-dependencies:
name: blotter and quantstrat
runs-on: ubuntu-latest

steps:
- name: Check out FinancialInstrument
uses: actions/checkout@v4

- name: Set up R
uses: r-lib/actions/setup-r@v2
with:
r-version: release
use-public-rspm: true

- name: Install test tools and FinancialInstrument dependencies
uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: |
any::rcmdcheck
any::pak

- name: Install current FinancialInstrument
run: R CMD INSTALL .

- name: Clone downstream packages
run: |
mkdir -p revdeps

git clone --depth 1 \
https://github.com/braverock/blotter.git \
revdeps/blotter

git clone --depth 1 \
https://github.com/braverock/quantstrat.git \
revdeps/quantstrat

- name: Install blotter dependencies
shell: Rscript {0}
run: |
pak::local_install_dev_deps(
"revdeps/blotter"
)

- name: Reinstall current FinancialInstrument
run: R CMD INSTALL .

- name: Check blotter
shell: Rscript {0}
run: |
result <- rcmdcheck::rcmdcheck(
"revdeps/blotter",
args = c(
"--no-manual",
"--no-vignettes"
),
error_on = "error"
)

print(result)

- name: Install checked blotter
run: R CMD INSTALL revdeps/blotter

- name: Install quantstrat core dependencies
shell: Rscript {0}
run: |
pak::pkg_install(c(
"quantmod",
"xts",
"foreach",
"iterators",
"zoo",
"TTR",
"MASS"
))

- name: Reinstall tested package chain
run: |
R CMD INSTALL .
R CMD INSTALL revdeps/blotter

- name: Check quantstrat
shell: Rscript {0}
run: |
result <- rcmdcheck::rcmdcheck(
"revdeps/quantstrat",
args = c(
"--no-manual",
"--no-vignettes"
),
error_on = "error"
)

print(result)
Loading