Skip to content

Commit

Permalink
Merge branch 'main' into val_test_5
Browse files Browse the repository at this point in the history
  • Loading branch information
LucieContamin committed Apr 22, 2024
2 parents 29aac15 + e4e4fba commit e9ff561
Show file tree
Hide file tree
Showing 3 changed files with 191 additions and 145 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/install_cache_dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

jobs:
cache-R-library:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest

steps:
- name: Checkout repository
Expand Down
28 changes: 20 additions & 8 deletions .github/workflows/validation.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
name: Validate Submission(s)
name: Validate Submission
on:
pull_request_target:
types: [synchronize, opened, reopened]
branches:
- main
- equity
paths:
- data-processed/**
paths:
- 'data-processed/**.parquet'

jobs:
validates-files:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest

steps:
- name: Checkout repository
Expand All @@ -17,6 +18,7 @@ jobs:
fetch-depth: 1

- name: Setup R
if: ( steps.change-check.outputs.skipnext != 'true' )
uses: r-lib/actions/setup-r@v2

- name: Install system dependencies
Expand All @@ -25,14 +27,13 @@ jobs:

- name: Cache R packages
id: cache
if: runner.os != 'Windows'
uses: actions/cache@v2
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-${{ hashFiles('.github/requirements.txt') }}-1

- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
if: ( steps.cache.outputs.cache-hit != 'true' )
run: |
R -e 'Sys.setenv("NOT_CRAN" = TRUE)
install.packages(c("arrow", "gh", "remotes"))
Expand All @@ -42,9 +43,20 @@ jobs:
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

- name: Run Validation
- name: Run Validation - Open/reopen
if: ( github.event.action != 'synchronize' )
run: |
Rscript code/validation.R
env:
GH_PR_NUMBER: ${{ github.event.pull_request.number }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Run Validation - Synchronize
if: ( github.event.action == 'synchronize' )
run: |
Rscript code/validation.R
env:
GH_PR_NUMBER: ${{ github.event.pull_request.number }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_COMMIT_SHA: ${{ github.event.pull_request.head.sha }}

Loading

0 comments on commit e9ff561

Please sign in to comment.