Skip to content

feat: support vector notation for length in note.json #274

feat: support vector notation for length in note.json

feat: support vector notation for length in note.json #274

Workflow file for this run

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
#
# See https://github.com/r-lib/actions/tree/master/examples#readme for
# additional example workflows available for the R community.
name: main
on:
pull_request:
types: [opened, reopened, closed, synchronize]
workflow_call:
inputs:
USERNAME:
required: true
type: string
PACKAGE_NAME:
required: true
type: string
BRANCH_NAME:
required: true
type: string
COMMIT_HASH:
required: true
type: string
COMMIT_MSG:
required: true
type: string
secrets:
PRIVATE_ACCESS_TOKEN:
required: true
GDRGENESIS_TRIGGER_TOKEN:
required: true
GDRVIZ_TRIGGER_TOKEN:
required: true
jobs:
package_test:
runs-on: ubuntu-24.04
if: github.event.pull_request.merged == false
env:
TEST_TAG: user/app:latest-${{ github.sha }}
USERNAME: ${{ github.actor }}
PACKAGE_NAME: ${{ github.event.repository.name }}
BRANCH_NAME: ${{ github.head_ref }}
BASE_IMAGE: marcinkam/gdrshiny:0.11
steps:
- uses: tspascoal/get-user-teams-membership@v1
id: checkUserMember
with:
username: ${{ env.USERNAME }}
team: 'PR reviewers'
GITHUB_TOKEN: ${{ secrets.PRIVATE_ACCESS_TOKEN }}
##########################
# External collaborators #
##########################
- if: ${{ steps.checkUserMember.outputs.isTeamMember == 'false' }}
name: Checkout
uses: actions/checkout@v2
- if: ${{ steps.checkUserMember.outputs.isTeamMember == 'false' }}
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- if: ${{ steps.checkUserMember.outputs.isTeamMember == 'false' }}
name: Build
uses: docker/build-push-action@v2
with:
context: .
load: true
tags: ${{ env.TEST_TAG }}
build-args: |
GITHUB_TOKEN=${{ secrets.PRIVATE_ACCESS_TOKEN }}
BASE_IMAGE=${{ env.BASE_IMAGE }}
- if: ${{ steps.checkUserMember.outputs.isTeamMember == 'false' }}
name: Run tests
run: |
docker run -v `pwd`:/mnt/vol ${{ env.TEST_TAG }} bash -c 'bash /mnt/vol/rplatform/run_tests.sh /mnt/vol/'
##################
# User from Gene #
##################
- if: ${{ steps.checkUserMember.outputs.isTeamMember == 'true' }}
name: Wait for test results
run: |
curl -s -X POST \
-F token=${{ secrets.GDRGENESIS_TRIGGER_TOKEN }} \
-F ref=main \
-F "variables[PACKAGE_NAME]=${{ env.PACKAGE_NAME }}" \
-F "variables[BRANCH_NAME]=${{ env.BRANCH_NAME }}" \
"https://code.roche.com/api/v4/projects/167859/trigger/pipeline"
exit 1
deploy-dev:
if: github.event.pull_request.merged
runs-on: ubuntu-24.04
env:
BRANCH_NAME: ${{ github.head_ref }}
COMMIT_HASH: ${{ github.sha }}
COMMIT_MSG: ${{ github.event.head_commit.message }}
steps:
- run: |
curl -s -X POST \
-F token=${{ secrets.GDRVIZ_TRIGGER_TOKEN }} \
-F ref=main \
-F "variables[SOURCE_BRANCH]=${{ env.BRANCH_NAME }}" \
-F "variables[COMMIT_HASH]=${{ env.COMMIT_HASH }}" \
-F "variables[COMMIT_MSG]=${{ env.COMMIT_MSG }}" \
-F "variables[TESTS_RESULT]=SUCCESSFUL" \
"https://code.roche.com/api/v4/projects/181632/trigger/pipeline"