Skip to content

add token

add token #8

# Get ss3 releases and run test model with estimation and hessian
name: run-releases-with-test-model
on:
workflow_dispatch:
push:
schedule:
- cron: '0 15 * * 2' # every Tuesday at 3pm UTC (= 1 0am EST or 11am EDT Eastern time)
# Run fast running SS3 test models with estimation
jobs:
run-releases-with-test-model:
runs-on: ${{ matrix.config.os }}
name: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- {os: windows-latest}
- {os: macos-13}
- {os: macos-latest}
- {os: ubuntu-latest}
env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout models repo
uses: actions/checkout@v4
with:
repository: 'nmfs-ost/ss3-test-models'
path: test-models-repo
- name: Update Ubuntu packages
if: matrix.config.os == 'ubuntu-latest'
run: |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install --only-upgrade libstdc++6
- name: Setup R
uses: r-lib/actions/setup-r@v2
- name: Install R packages to run in parallel
run: Rscript -e 'install.packages(c("pak", "remotes"))'
# - name: Install r4ss (for all but ubuntu)
# if: matrix.config.os == 'macos-13' || matrix.config.os == 'macos-latest' || matrix.config.os == 'windows-latest'
# run: Rscript -e 'pak::pkg_install("r4ss/r4ss")'
- name: Install r4ss (ubuntu)
run: Rscript -e 'remotes::install_github("r4ss/r4ss", ref = "more-gh-fixes-for-gha")'
- name: Run test model
run: |
old_dir <- file.path(getwd(), "test-models-repo", "models", "two_morph_seas_areas")
dir <- file.path(getwd(), "two_morph_seas_areas")
dir.create(dir)
file.rename(old_dir, dir)
unlink(old_dir,recursive = TRUE)
r4ss::get_ss3_exe(dir = dir)
r4ss::run(dir = dir)
shell: Rscript {0}