Skip to content

Commit

Permalink
initial workflow and docker changes
Browse files Browse the repository at this point in the history
  • Loading branch information
dmekala-va committed Oct 18, 2024
1 parent 5f0ad4f commit fe2c9f5
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 12 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Saml Proxy CI

on:
workflow_dispatch:
pull_request:
push:
branches:
- master
- API-41055-utlint
jobs:
lint:
name: Lint
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '16.20.0'
cache: 'npm'
cache-dependency-path: package-lock.json

- name: Install dependencies
run: npm ci

- name: Lint code
run: npm run lint

test:
name: Test
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '16.20.0'
cache: 'npm'
cache-dependency-path: package-lock.json

- name: Install dependencies
run: npm ci

- name: Run tests
run: npm run test:ci

snyk:
name: Run Snyk Scan
uses: department-of-veterans-affairs/lighthouse-tornado-secrel-pipeline/.github/workflows/snyk.yml@v6
with:
config-file: .github/secrel/config.yml
secrets: inherit
12 changes: 0 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,6 @@ HEALTHCHECK --interval=1m --timeout=4s --start-period=30s \
ENTRYPOINT ["/usr/local/bin/tini", "--"]
CMD ["node", "build/app.js", "--config", "/etc/saml-proxy/config.json"]

FROM npminstall as testandlint

COPY --chown=lhuser:lhuser bin/ bin/
COPY --chown=lhuser:lhuser src/ src/
COPY --chown=lhuser:lhuser test/ test/
COPY --chown=lhuser:lhuser public/ public/
COPY --chown=lhuser:lhuser styles/ styles/
COPY --chown=lhuser:lhuser views/ views/
COPY --chown=lhuser:lhuser tsconfig.json ./
COPY --chown=lhuser:lhuser .eslint* ./
COPY --chown=lhuser:lhuser tsconfig.json ./

# Static Labels
LABEL org.opencontainers.image.authors="[email protected]" \
org.opencontainers.image.url="https://github.com/department-of-veterans-affairs/lighthouse-saml-proxy/tree/master/Dockerfile" \
Expand Down

0 comments on commit fe2c9f5

Please sign in to comment.