Skip to content

Commit

Permalink
ci: add all the github scripts
Browse files Browse the repository at this point in the history
Signed-off-by: Ali Sajid Imami <[email protected]>
  • Loading branch information
AliSajid committed Oct 26, 2024
1 parent 3f0b3fb commit 4d0b4e7
Show file tree
Hide file tree
Showing 8 changed files with 225 additions and 4 deletions.
1 change: 1 addition & 0 deletions .github/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.html
89 changes: 89 additions & 0 deletions .github/workflows/create_github_release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
on:
push:
branches:
- devel
- RELEASE*

name: Create Github Release

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

jobs:
optimize_ci:
runs-on: ubuntu-latest
outputs:
skip: ${{ steps.check_skip.outputs.skip }}
steps:
- name: Optimize CI
id: check_skip
uses: withgraphite/graphite-ci-action@main
with:
graphite_token: ${{secrets.GRAPHITE_TOKEN}}
create-release:
runs-on: ubuntu-latest
needs: [optimize_ci]
if: needs.optimize_ci.outputs.skip == 'false'
permissions:
contents: write
outputs:
tag_version: ${{ steps.create_release.outputs.tag_version }}
steps:
- name: Checkout
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
with:
fetch-depth: 0
- name: Get most recent tag
id: get_tag
run: echo "TAG_VERSION=$(git describe --tags $(git rev-list --tags --max-count=1))" >> "$GITHUB_ENV"
- name: Create Release
id: create_release
env:
GITHUB_TOKEN: ${{ github.token }}
run: |
echo "Creating release for tag $TAG_VERSION"
gh release create $TAG_VERSION --title "Release $TAG_VERSION" --notes "Release $TAG_VERSION" --target ${{ github.ref }}
echo "tag_version=$TAG_VERSION" >> "$GITHUB_OUTPUT"
create_release_artifacts:
needs: [create-release]
permissions:
contents: write
strategy:
fail-fast: false
matrix:
r_version: ['release', 'devel']
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- name: Update system repositories
run: sudo apt-get update
- name: Install system dependencies
run: |
sudo apt-get install -y libxml2-dev \
libssl-dev libcurl4-openssl-dev \
libharfbuzz-dev libfribidi-dev \
pandoc
- name: Setup R
uses: r-lib/actions/setup-r@e6be4b3706e0f39bc7a4cf4496a5f2c4cb840040 # v2.10.1
with:
r-version: ${{ matrix.r_version }}
use-public-rspm: true
id: r
- name: Install dependencies
uses: r-lib/actions/setup-renv@e6be4b3706e0f39bc7a4cf4496a5f2c4cb840040 # v2.10.1
- name: Build Package
run: R CMD build .
- name: Rename Package
run: echo "NEWNAME=$(./utilities/rename-package.R *.tar.gz)" >> "$GITHUB_ENV"
- name: debug
run: |
echo "R version: ${{ steps.r.outputs.installed-r-version }}"
echo "Current Tag: ${{ needs.create-release.outputs.tag_version }}"
echo "Release File Name: ${{ env.NEWNAME }}"
- name: Upload Release Artifact
env:
RELEASE_TAG: ${{ needs.create-release.outputs.tag_version }}
GH_TOKEN: ${{ github.token }}
run: gh release upload ${{ env.RELEASE_TAG }} ${{ env.NEWNAME }}
68 changes: 68 additions & 0 deletions .github/workflows/rworkflows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Continuous Integration / R Workflows
on:
workflow_dispatch:
push:
branches-ignore:
- master
- main
- RELEASE_**
- graphite-**
pull_request:
branches:
- master
- main
- devel
- RELEASE_**

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

jobs:
optimize_ci:
runs-on: ubuntu-latest
outputs:
skip: ${{ steps.check_skip.outputs.skip }}
steps:
- name: Optimize CI
id: check_skip
uses: withgraphite/graphite-ci-action@main
with:
graphite_token: ${{secrets.GRAPHITE_TOKEN}}
rworkflows:
runs-on: ${{ matrix.config.os }}
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
container: ${{ matrix.config.cont }}
needs: [optimize_ci]
if: needs.optimize_ci.outputs.skip == 'false'
strategy:
fail-fast: ${{ false }}
matrix:
config:
- os: ubuntu-latest
bioc: devel
r: auto
cont: bioconductor/bioconductor_docker:devel
rspm: https://packagemanager.rstudio.com/cran/__linux__/focal/release
- os: macOS-latest
bioc: devel
r: auto
- os: windows-latest
bioc: devel
r: auto
steps:
- uses: neurogenomics/rworkflows@master
with:
run_bioccheck: ${{ true }}
run_rcmdcheck: ${{ true }}
as_cran: ${{ true }}
run_vignettes: ${{ true }}
has_testthat: ${{ true }}
run_covr: ${{ false }}
run_pkgdown: ${{ false }}
has_runit: ${{ false }}
has_latex: ${{ false }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run_docker: ${{ false }}
runner_os: ${{ runner.os }}
cache_version: cache-v1
62 changes: 62 additions & 0 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main, master, devel]
pull_request:
branches: [main, master, devel]

name: test-coverage

jobs:
optimize_ci:
runs-on: ubuntu-latest
outputs:
skip: ${{ steps.check_skip.outputs.skip }}
steps:
- name: Optimize CI
id: check_skip
uses: withgraphite/graphite-ci-action@main
with:
graphite_token: ${{secrets.GRAPHITE_TOKEN}}
test-coverage:
runs-on: ubuntu-latest
needs: [optimize_ci]
if: needs.optimize_ci.outputs.skip == 'false'
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4

- uses: r-lib/actions/setup-r@e6be4b3706e0f39bc7a4cf4496a5f2c4cb840040 # v2
with:
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@e6be4b3706e0f39bc7a4cf4496a5f2c4cb840040 # v2
with:
extra-packages: any::covr
needs: coverage

- name: Test coverage
run: |
covr::codecov(
quiet = FALSE,
clean = FALSE,
install_path = file.path(Sys.getenv("RUNNER_TEMP"), "package")
)
shell: Rscript {0}

- name: Show testthat output
if: always()
run: |
## --------------------------------------------------------------------
find ${{ runner.temp }}/package -name 'testthat.Rout*' -exec cat '{}' \; || true
shell: bash

- name: Upload test results
if: always()
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4
with:
name: coverage-test-failures
path: ${{ runner.temp }}/package
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ repos:
data/.*|
.*\.(gz|xz|bz2)|
(.*/|)codemeta.json|
COMMIT_EDITMSG
(.*)COMMIT_EDITMSG|
)$
- id: readme-rmd-rendered
- id: parsable-R
Expand Down
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: PCSF
Title: Network-based interpretation of highthroughput data
Version: 0.99.67
Version: 0.99.68
Date: 2017-02-01
Author: Murodzhon Akhmedov, Amanda Kedaigle, Renan Escalante, Roberto
Montemanni, Francesco Bertoni, Ernest Fraenkel, Ivo Kwee
Expand Down
4 changes: 2 additions & 2 deletions codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"description": "The PCSF package performs an integrated analysis of highthroughput data using the interaction networks as a template, and interprets the biological landscape of interaction networks with respect to the data, which potentially leads to predictions of functional units. It also interactively visualize the resulting subnetwork with functional enrichment analysis.",
"name": "PCSF: Network-based interpretation of highthroughput data",
"license": "https://spdx.org/licenses/MIT",
"version": "0.99.67",
"version": "0.99.68",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "R",
Expand Down Expand Up @@ -181,7 +181,7 @@
},
"SystemRequirements": null
},
"fileSize": "7741.971KB",
"fileSize": "7741.975KB",
"codeRepository": "https://github.com/CogDisResLab/PCSF",
"readme": "https://github.com/CogDisResLab/PCSF/blob/master/README.md"
}
1 change: 1 addition & 0 deletions inst/WORDLIST
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ biomolecule
biomolecules
BMC
CBL
ci
CMake
config
downregulation
Expand Down

0 comments on commit 4d0b4e7

Please sign in to comment.