-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from umccr/gha-test
Dependency update to R v4.3
- Loading branch information
Showing
28 changed files
with
798 additions
and
219 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
^\.bumpversion\.cfg$ | ||
^\.bumpversion\.toml$ | ||
^data-raw$ | ||
^docs$ | ||
^LICENSE\.md$ | ||
|
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,12 +4,13 @@ on: | |
push: | ||
branches: | ||
- main | ||
- gha-test | ||
env: | ||
atoken: ${{ secrets.ANACONDA_UPLOAD_TOKEN }} | ||
recipe_path: conda/recipe | ||
env_yaml_path: conda/env/yaml | ||
env_lock_path: conda/env/lock | ||
VERSION: '0.1.2.1' # versioned by bump2version | ||
VERSION: '0.1.2.5' # versioned by bump2version | ||
GDRIVE_CREDENTIALS_DATA: ${{ secrets.GDRIVE_CREDENTIALS_DATA }} | ||
|
||
jobs: | ||
|
@@ -25,47 +26,36 @@ jobs: | |
steps: | ||
- name: Code checkout | ||
uses: actions/checkout@v4 | ||
- name: Miniconda setup | ||
uses: conda-incubator/setup-miniconda@v2 | ||
- name: MicroMamba setup | ||
uses: mamba-org/setup-micromamba@v2 | ||
with: | ||
auto-update-conda: true | ||
add-pip-as-python-dependency: false # conda-lock goes crazy if pip pre-installed | ||
activate-environment: env1 | ||
mamba-version: "*" | ||
channels: "umccr,conda-forge,bioconda" | ||
environment-file: ${{ env.env_yaml_path }}/condabuild.yaml | ||
- name: 🐍 Conda pkg build and upload | ||
run: | | ||
conda activate | ||
mamba create --name cbuildenv conda-build conda-verify anaconda-client boa | ||
conda activate cbuildenv | ||
conda mambabuild --R 4.2 ${recipe_path} --token ${atoken} | ||
conda mambabuild ${recipe_path} -c umccr -c conda-forge -c bioconda --token ${atoken} | ||
- name: 🔒 Conda lock | ||
run: | | ||
conda activate | ||
mamba create --name lockenv conda-lock pip | ||
conda activate lockenv | ||
conda-lock --file ${env_yaml_path}/sigrap.yaml --platform linux-64 | ||
mv conda-lock.yml ${env_lock_path}/conda-lock.yml | ||
# 1. generate a combined lock file | ||
# 2. render platform-specific locks | ||
conda-lock lock --file ${env_yaml_path}/sigrap.yaml -p osx-64 -p linux-64 | ||
conda-lock render --kind explicit -p osx-64 -p linux-64 conda-lock.yml --filename-template 'sigrap-{platform}.lock' && rm conda-lock.yml | ||
mv sigrap-*.lock ${env_lock_path}/ | ||
- name: 💾 Commit lockfile | ||
run: | | ||
# TODO: the version bumping guarantees there will be changes, | ||
# but during testing this can be problematic - need to | ||
# commit only if changes exist. | ||
git status | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "GitHub Actions" | ||
MSG="[bot] Updating conda-lock file (v${VERSION})" | ||
MSG="[bot] Updating conda-lock files (v${VERSION})" | ||
git add . | ||
git commit -m "${MSG}" | ||
git push | ||
- name: 🌐 Website publish | ||
run: | | ||
conda activate | ||
mamba env create -n pkgdownenv -f ${env_yaml_path}/pkgdown.yaml | ||
conda activate pkgdownenv | ||
sigrap.R --version | ||
Rscript -e "pkgdown::deploy_to_branch(pkg = '.', commit_message = paste(pkgdown:::construct_commit_message('.'), '- see https://umccr.github.io/sigrap/'), branch = 'gh-pages', new_process = FALSE)" | ||
# - name: 🌐 Website publish | ||
# run: | | ||
# micromamba env create -n pkgdownenv -f ${env_yaml_path}/pkgdown.yaml | ||
# micromamba activate pkgdownenv | ||
# sigrap.R --version | ||
# Rscript -e "pkgdown::deploy_to_branch(pkg = '.', commit_message = paste(pkgdown:::construct_commit_message('.'), '- see https://umccr.github.io/sigrap/'), branch = 'gh-pages', new_process = FALSE)" | ||
|
||
- name: 📥 Pull lock commit | ||
id: pull_lock_commit | ||
|
@@ -75,7 +65,7 @@ jobs: | |
LATEST_COMMIT_HASH="$(git --no-pager log -1 --format='%H')" | ||
echo "latest_commit_hash=${LATEST_COMMIT_HASH}" >> $GITHUB_OUTPUT | ||
- name: 🔖 Create tag | ||
uses: actions/github-script@v6 | ||
uses: actions/github-script@v7 | ||
env: | ||
LATEST_COMMIT_HASH: ${{ steps.pull_lock_commit.outputs.latest_commit_hash }} | ||
with: | ||
|
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
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
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
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
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
Oops, something went wrong.