From 5bedf09b7271cc22742b60bba4911de894f6a2a4 Mon Sep 17 00:00:00 2001 From: Anmol Sharma Date: Mon, 18 Mar 2024 18:47:29 +0530 Subject: [PATCH] feat: try using setup script for grading Signed-off-by: Anmol Sharma --- .github/workflows/grader.yaml | 25 +++++-------------------- test.sh | 4 ++++ 2 files changed, 9 insertions(+), 20 deletions(-) create mode 100644 test.sh diff --git a/.github/workflows/grader.yaml b/.github/workflows/grader.yaml index ea487a2be..ef382ee1a 100644 --- a/.github/workflows/grader.yaml +++ b/.github/workflows/grader.yaml @@ -4,26 +4,11 @@ on: jobs: grader: runs-on: ubuntu-latest - defaults: - run: - working-directory: ./grader steps: - name: Checkout uses: actions/checkout@v3 - - name: Setup node - uses: actions/setup-node@v3 - with: - node-version: 20.9.x - cache: npm - cache-dependency-path: ./grader - - name: Cache node modules - id: cache-node-modules - uses: actions/cache@v3 - with: - path: grader/node_modules - key: node-modules-${{ hashFiles('package-lock.json') }} - - name: Install Dependencies - if: steps.cache-node-modules.outputs.cache-hit != 'true' - run: npm install - - name: Validate block - run: npm run verify-block + - name: Run script file + run: | + chmod +x ./test.sh + ./test.sh + shell: bash diff --git a/test.sh b/test.sh new file mode 100644 index 000000000..75433fd6c --- /dev/null +++ b/test.sh @@ -0,0 +1,4 @@ +cd ./grader || exit +npm install + +npm run verify-block \ No newline at end of file