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

Val pipeline with JSON artifacts (replacing markdowns and PDFs) #9

Open
wants to merge 35 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
7e499b0
Update test.yaml
yannfeat Jan 18, 2024
60ec81d
Create pkgs_cran.json
yannfeat Jan 18, 2024
ce1e5cd
Create val-pipeline.yaml
yannfeat Jan 18, 2024
2f69e1d
Create test-val-pipeline.yaml
yannfeat Jan 18, 2024
7db1646
Update pkgs_cran.json
yannfeat Jan 18, 2024
9ff5dfe
Update test-val-pipeline.yaml
yannfeat Jan 18, 2024
6a879c5
Update val-pipeline.yaml
yannfeat Jan 18, 2024
01fa81e
Update val-pipeline.yaml
yannfeat Jan 18, 2024
0f72e6f
Update val-pipeline.yaml
yannfeat Jan 19, 2024
d67288f
Update val-pipeline.yaml
yannfeat Jan 19, 2024
0cafbf8
Update val-pipeline.yaml
yannfeat Jan 19, 2024
4ef5626
Update report-generator.R
yannfeat Jan 19, 2024
ea34b60
Update report-generator.R
yannfeat Jan 19, 2024
6e9f430
Update validation-template.Rmd
yannfeat Jan 19, 2024
45b8fd9
Update report-generator.R
yannfeat Jan 19, 2024
76f87fa
Update validation-template.Rmd
yannfeat Jan 19, 2024
8344f96
Update report-generator.R
yannfeat Jan 19, 2024
0f782ce
Update validation-template.Rmd
yannfeat Jan 19, 2024
e51fde9
Update validation-template.Rmd
yannfeat Jan 19, 2024
2d8dc4e
Merge pull request #1 from yannfeat/initiate-val-pipeline
yannfeat Jan 19, 2024
09d9cc9
Update report-generator.R change to json output file
Stefan-Doering-BI Feb 9, 2024
c4b2204
Added new dependency jsonlite
Stefan-Doering-BI Feb 9, 2024
856460f
Merge pull request #8 from Stefan-Doering-BI/main
dgkf Feb 9, 2024
2f4ea00
Merge branch 'dev' into main
yannfeat Feb 9, 2024
3b5b801
Merge pull request #4 from yannfeat/main
dgkf Feb 9, 2024
086a924
Remove code related to PDF and HTML artifacts
yannfeat Feb 13, 2024
ba48594
Delete template.Rmd
yannfeat Feb 13, 2024
f5510b7
Remove code related to PDF and HTML artifacts - 2
yannfeat Feb 13, 2024
dca4fe2
Merge branch 'dev' of https://github.com/yannfeat/thevalidatoR into dev
yannfeat Feb 13, 2024
d8bde93
Merge pull request #11 from yannfeat/dev
yannfeat Feb 13, 2024
44ced5b
Fix: remove yml instructions related to tlmgr
yannfeat Feb 17, 2024
1e74649
Merge pull request #12 from yannfeat/dev
yannfeat Feb 17, 2024
a5c3b1f
Change test package
yannfeat Feb 17, 2024
c9f63a4
Merge pull request #13 from yannfeat/dev
yannfeat Feb 17, 2024
9e51b21
Update DESCRIPTION
Stefan-Doering-BI Feb 22, 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
13 changes: 0 additions & 13 deletions .github/workflows/short-tagging.yml

This file was deleted.

14 changes: 14 additions & 0 deletions .github/workflows/test-val-pipeline.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: Test the validation pipeline reusable workflow

on:
pull_request:
branches:
- main

jobs:
test-val-pipeline-aragog:
uses: ./.github/workflows/val-pipeline.yaml
with:
target: aragog
report_pkg_dir: ./tests/packages/aragog
53 changes: 0 additions & 53 deletions .github/workflows/test.yaml

This file was deleted.

47 changes: 0 additions & 47 deletions .github/workflows/test_no_cache.yaml

This file was deleted.

138 changes: 138 additions & 0 deletions .github/workflows/val-pipeline.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
---
name: Reusable workflow for the validation pipeline

on:
workflow_call:
inputs:
cran:
description: 'CRAN repository'
required: false
default: 'https://packagemanager.rstudio.com/cran/__linux__/focal/latest'
type: string
target:
description: 'Name of the target package'
required: true
default: 'buckbeak'
type: string
report_pkg_dir:
description: "Path to target package's root"
required: false
default: '.'
type: string

jobs:
dependencies-matrix:
runs-on: ubuntu-latest
name: Create the matrix of dependencies
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- name: Checkout ${{ inputs.target }}
uses: actions/checkout@v3

- id: set-matrix
run: |
{
echo 'matrix<<EOF'
echo "$(cat ./tests/packages/${{ inputs.target }}/pkgs_cran.json)"
echo EOF
} >> "$GITHUB_OUTPUT"
cat $GITHUB_OUTPUT

val-pipeline-dependencies:
needs: dependencies-matrix
runs-on: ubuntu-latest
name: Validation outputs for dependencies
container:
image: rocker/verse:4.1.2
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
GITHUB_ACTION_PATH: .
strategy:
fail-fast: false
max-parallel: 2
matrix:
dependency: ${{ fromJson(needs.dependencies-matrix.outputs.matrix) }}
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set R options
run: |
echo 'options(
repos = "${{ inputs.cran }}", Ncpus = 2, crayon.enabled = TRUE
)' >> ~/.Rprofile

- name: Set up R library
run: |
mkdir -p ./R_LIBS_USER
echo '.libPaths("./R_LIBS_USER")' >> ~/.Rprofile

- name: Download dependency
run: |
R -q -e 'remotes_url <- "${{ inputs.cran }}/src/contrib/Archive/remotes/remotes_2.4.2.tar.gz";
install.packages(remotes_url, repos = NULL, type = "source",
dependencies = c("Depends", "Imports"),
INSTALL_opts = c("--no-docs", "--clean", "--no-multiarch",
"--no-data", "--no-help", "--no-demo")
);
library(remotes);
archive_dep <- download_version(
"${{ matrix.dependency.name }}",
version = "${{ matrix.dependency.version }}",
type = "source"
);
untar(archive_dep, exdir = "./_dep/")'

- name: Get path to dependency
id: get-dep-path
run: echo "dep-path=$(echo $PWD/_dep/${{ matrix.dependency.name }})\n" >> $GITHUB_OUTPUT

- name: Generate validation report for ${{ matrix.dependency.name }}
id: validation
uses: ./
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
with:
report_pkg_dir: ${{ steps.get-dep-path.outputs.dep-path }}
report_output_prefix: ${{ inputs.target }}-${{ matrix.dependency.name }}-${{ matrix.dependency.version }}-validation-report

- name: Upload ${{ matrix.dependency.name }} validation report
uses: actions/upload-artifact@v2
if: success()
with:
name: ${{ matrix.dependency.name }} validation report
path: ${{ steps.validation.outputs.report_output_filename }}
if-no-files-found: error

val-pipeline-target:
runs-on: ubuntu-latest
name: Validation output for target package
container:
image: rocker/verse:4.1.2
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
GITHUB_ACTION_PATH: .
strategy:
fail-fast: false
max-parallel: 2
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Generate validation report for ${{ inputs.target }}
id: validation
uses: ./
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
with:
report_pkg_dir: ${{ inputs.report_pkg_dir }}
report_output_prefix: validation_report

- name: Upload ${{ inputs.target }} validation report
uses: actions/upload-artifact@v2
if: success()
with:
name: ${{ inputs.target }} validation report
path: ${{ steps.validation.outputs.report_output_filename }}
if-no-files-found: error
Loading
Loading