Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split ci.yml into separate actions #280

Merged
merged 48 commits into from
Oct 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
9a71776
Split `ci.yml` into separate actions
TimothyWillard Aug 2, 2024
e3adcba
Correct working dir in `inference-ci.yml`
TimothyWillard Aug 2, 2024
240b257
Set `gempyor` integration tests shell
TimothyWillard Aug 2, 2024
e49109a
Limit paths for PRs in actions
TimothyWillard Aug 2, 2024
49475af
Remove 'breaking-improvements' branch
TimothyWillard Aug 6, 2024
22ff4c9
Merge branch 'main' into split-up-unit-tests-action
TimothyWillard Aug 7, 2024
6ac064f
Merge branch 'main' into split-up-unit-tests-action
TimothyWillard Aug 8, 2024
24fdb86
Merge main into split-up-unit-tests-action
TimothyWillard Aug 15, 2024
072dc27
Merge main into split-up-unit-tests-action
TimothyWillard Sep 9, 2024
b5c41cf
Merge branch 'main' into split-up-unit-tests-action
jcblemai Oct 2, 2024
b56d2d9
Update gempyor action to test 3.11 and 3.10
TimothyWillard Oct 7, 2024
ea3ebc6
Delete line to trigger GH Action
TimothyWillard Oct 7, 2024
3d087c7
Correct extra install name
TimothyWillard Oct 7, 2024
516909a
Add dependency in GitHub workflows
TimothyWillard Oct 9, 2024
323285e
Merge branch 'main' into split-up-unit-tests-action
TimothyWillard Oct 10, 2024
2b721c2
Merge branch 'main' into split-up-unit-tests-action
TimothyWillard Oct 14, 2024
4b9d019
Remove custom docker from flepicommon CI
TimothyWillard Oct 16, 2024
07d93cd
Add empty space to invoke flepicommon CI
TimothyWillard Oct 16, 2024
bd91d7b
Attempt to speed up flepicommon CI
TimothyWillard Oct 16, 2024
132ba53
Install `flepicommon` with `install.packages`
TimothyWillard Oct 16, 2024
dbd692e
Avoid installing `flepicommon`
TimothyWillard Oct 16, 2024
58ab3b4
Install specific R from posit deb
TimothyWillard Oct 16, 2024
9bdbbc8
Remove sudo usage
TimothyWillard Oct 16, 2024
7587dfd
Debug dir permission issue.
TimothyWillard Oct 16, 2024
651965e
Restore prior version of `__init__.py`
TimothyWillard Oct 16, 2024
e62b054
Change R library perms
TimothyWillard Oct 16, 2024
5b02c22
Add missing `repos` arg
TimothyWillard Oct 16, 2024
782d677
Install flepicommon with devtools, caching
TimothyWillard Oct 17, 2024
457e94b
Add missing commas
TimothyWillard Oct 17, 2024
a16e5de
Manual install of deprecated covidcast
TimothyWillard Oct 17, 2024
8ccdae5
Add missing `libudunits2-dev` for `units` pkg
TimothyWillard Oct 17, 2024
3ce2b48
Missing gdal deps for `sf` package
TimothyWillard Oct 17, 2024
aeb96be
Make `inference` ci similar to `flepicommon` ci
TimothyWillard Oct 17, 2024
551fdaa
Trigger `inference-ci`
TimothyWillard Oct 17, 2024
7948050
Limit to python 3.10 for the moment
TimothyWillard Oct 17, 2024
82fe326
Fix invalid or syntax
TimothyWillard Oct 17, 2024
db79f30
Remove dup `devtools` install, erroneous line
TimothyWillard Oct 17, 2024
a05500f
Avoid checking out documentation folder
TimothyWillard Oct 17, 2024
9daa90e
Add missing shell specification
TimothyWillard Oct 17, 2024
1ea7afe
Add R version to cache
TimothyWillard Oct 17, 2024
10b4a28
Add back python 3.11
TimothyWillard Oct 17, 2024
6c9aff7
Remove whitespace to trigger full CI
TimothyWillard Oct 17, 2024
161915e
Rename 'ci' step to 'tests'
TimothyWillard Oct 18, 2024
d659cf7
Merge main into split-up-unit-tests-action
TimothyWillard Oct 18, 2024
0bebbb3
Remove `devtools::uninstall` calls
TimothyWillard Oct 18, 2024
d1418de
Merge main into split-up-unit-tests-action
TimothyWillard Oct 18, 2024
cd81c5e
Remove whitespace changes
TimothyWillard Oct 18, 2024
f67ffeb
Remove `dev` branch from triggers
TimothyWillard Oct 18, 2024
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
70 changes: 0 additions & 70 deletions .github/workflows/ci.yml

This file was deleted.

79 changes: 79 additions & 0 deletions .github/workflows/flepicommon-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: flepicommon-ci

on:
workflow_dispatch:
push:
paths:
- flepimop/R_packages/flepicommon/**/*
branches:
- main
pull_request:
paths:
- flepimop/R_packages/flepicommon/**/*
branches:
- main

jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
R-version: ["4.3.3"]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
lfs: true
sparse-checkout: |
*
!documentation/
sparse-checkout-cone-mode: false
- name: Setup R
uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.R-version }}
update-rtools: true
- name: Install System Dependencies
run: sudo apt install libcurl4-openssl-dev libharfbuzz-dev libfribidi-dev libtiff5-dev libudunits2-dev libgdal-dev libgeos-dev libproj-dev
- name: Determine R Library Location
run: |
R_LIBPATH=$( R -s -e "cat(.libPaths()[1L])" | xargs )
echo "R_LIBPATH=$R_LIBPATH" >> $GITHUB_ENV
R_LIBPATH_CKSUM=$( echo "$R_LIBPATH" | cksum | cut -d ' ' -f 1 )
echo "R_LIBPATH_CKSUM=$R_LIBPATH_CKSUM" >> $GITHUB_ENV
CACHE_DATE=$( date -d "last Sunday" +%Y%m%d )
echo "CACHE_DATE=$CACHE_DATE" >> $GITHUB_ENV
- name: R Library Cache
uses: actions/cache@v4
with:
key: flepicommon-rlibs-${{ runner.os }}-${{ matrix.R-version }}-${{ hashFiles('flepimop/R_packages/flepicommon/DESCRIPTION', 'flepimop/R_packages/flepicommon/NAMESPACE') }}-${{ env.R_LIBPATH_CKSUM }}-${{ env.CACHE_DATE }}
path: ${{ env.R_LIBPATH }}
- name: Install R Dependencies
if: steps.r-library-cache.outputs.cache-hit != 'true'
run: |
install.packages(
"devtools",
repos = "https://cloud.r-project.org",
)
library(devtools)
devtools::install_deps(
pkg = "flepimop/R_packages/flepicommon",
dependencies = TRUE
)
install.packages("covidcast", repos = "https://cloud.r-project.org")
shell: Rscript {0}
- name: Install The flepicommon Package
run: |
devtools::install(
pkg = "flepimop/R_packages/flepicommon",
args = c(getOption("devtools.install.args"), "--install-tests"),
quick = TRUE,
dependencies = TRUE,
force = TRUE
)
shell: Rscript {0}
- name: Run Tests
run: |
library(testthat)
test_package("flepicommon")
shell: Rscript {0}
51 changes: 51 additions & 0 deletions .github/workflows/gempyor-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: gempyor-ci

on:
workflow_dispatch:
push:
paths:
- examples/**/*
- flepimop/gempyor_pkg/**/*
branches:
- main
pull_request:
paths:
- examples/**/*
- flepimop/gempyor_pkg/**/*
branches:
- main

jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11"]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
lfs: true
sparse-checkout: |
*
!documentation/
sparse-checkout-cone-mode: false
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install gempyor
run: |
python -m pip install --upgrade pip
python -m pip install "flepimop/gempyor_pkg[test]"
shell: bash
- name: Run gempyor tests
run: |
cd flepimop/gempyor_pkg
pytest --exitfirst
shell: bash
- name: Run gempyor-cli integration tests from examples
run: |
cd examples
pytest --exitfirst
shell: bash
112 changes: 112 additions & 0 deletions .github/workflows/inference-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
name: inference-ci

on:
workflow_dispatch:
workflow_run:
workflows: ['flepicommon-ci', 'gempyor-ci']
types:
- completed
push:
paths:
- flepimop/R_packages/inference/**/*
branches:
- main
pull_request:
paths:
- flepimop/R_packages/inference/**/*
branches:
- main

jobs:
tests:
runs-on: ubuntu-latest
if: ${{ github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' }}
strategy:
matrix:
R-version: ["4.3.3"]
python-version: ["3.10", "3.11"]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
lfs: true
sparse-checkout: |
*
!documentation/
sparse-checkout-cone-mode: false
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install gempyor
run: |
python -m pip install --upgrade pip
python -m pip install "flepimop/gempyor_pkg[test]"
shell: bash
- name: Setup R
uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.R-version }}
update-rtools: true
- name: Install System Dependencies
run: sudo apt install libcurl4-openssl-dev libharfbuzz-dev libfribidi-dev libtiff5-dev libudunits2-dev libgdal-dev libgeos-dev libproj-dev
- name: Determine R Library Location
run: |
R_LIBPATH=$( R -s -e "cat(.libPaths()[1L])" | xargs )
echo "R_LIBPATH=$R_LIBPATH" >> $GITHUB_ENV
R_LIBPATH_CKSUM=$( echo "$R_LIBPATH" | cksum | cut -d ' ' -f 1 )
echo "R_LIBPATH_CKSUM=$R_LIBPATH_CKSUM" >> $GITHUB_ENV
CACHE_DATE=$( date -d "last Sunday" +%Y%m%d )
echo "CACHE_DATE=$CACHE_DATE" >> $GITHUB_ENV
- name: R Library Cache
uses: actions/cache@v4
with:
key: inference-rlibs-${{ runner.os }}-${{ matrix.R-version }}-${{ hashFiles('flepimop/R_packages/flepicommon/DESCRIPTION', 'flepimop/R_packages/flepicommon/NAMESPACE', 'flepimop/R_packages/inference/DESCRIPTION', 'flepimop/R_packages/inference/NAMESPACE') }}-${{ env.R_LIBPATH_CKSUM }}-${{ env.CACHE_DATE }}
path: ${{ env.R_LIBPATH }}
- name: Install R Dependencies For flepicommon
if: steps.r-library-cache.outputs.cache-hit != 'true'
run: |
install.packages(
"devtools",
repos = "https://cloud.r-project.org",
)
library(devtools)
devtools::install_deps(
pkg = "flepimop/R_packages/flepicommon",
dependencies = TRUE
)
install.packages("covidcast", repos = "https://cloud.r-project.org")
shell: Rscript {0}
- name: Install The flepicommon Package
run: |
devtools::install(
pkg = "flepimop/R_packages/flepicommon",
quick = TRUE,
dependencies = TRUE,
force = TRUE
)
shell: Rscript {0}
- name: Install R Dependencies For inference
if: steps.r-library-cache.outputs.cache-hit != 'true'
run: |
devtools::install_deps(
pkg = "flepimop/R_packages/inference",
dependencies = TRUE
)
install.packages("covidcast", repos = "https://cloud.r-project.org")
shell: Rscript {0}
- name: Install The inference Package
run: |
devtools::install(
pkg = "flepimop/R_packages/inference",
args = c(getOption("devtools.install.args"), "--install-tests"),
quick = TRUE,
dependencies = TRUE,
force = TRUE
)
shell: Rscript {0}
- name: Run Tests
run: |
library(testthat)
test_package("inference")
shell: Rscript {0}