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

API-45148 Add github actions workflow #214

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
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
28 changes: 28 additions & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs

name: Build and Test

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

jobs:
build:

runs-on: ubuntu-latest
container:
image: ghcr.io/department-of-veterans-affairs/health-apis-docker-octopus/lighthouse-node-application-base:v2-node18-di

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you try adding this
options: --user root


steps:
- uses: actions/checkout@v4
# - name: Use Node.js ${{ matrix.node-version }}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

similar way, when it tries to run the action, it will ask for secrets. Can you check if these are added in the repo/org secrets.
GITHUB_USERNAME: ${{ secrets.GITHUB_USERNAME }}
GITHUB_TOKEN: ${{ secrets.GITHUB_USERNAME_TOKEN }}

# uses: actions/setup-node@v3
# with:
# node-version: '18.x'
# cache: 'npm'
- run: npm ci
- run: npm run build
- run: npm run test:ci