From 95aa4c261a6fd2dc1c680b47640e3adda08c4768 Mon Sep 17 00:00:00 2001 From: gunamadura Date: Thu, 29 Aug 2024 00:45:10 +0530 Subject: [PATCH 1/2] Adding new files --- Dockerfile | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..42d4ec0 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,7 @@ +FROM node:slim +WORKDIR /myapp +COPY package*.json ./ +RUN npm install +COPY . . +EXPOSE 8086 +CMD ["npm", "run", "dev","--", "--host", "--port", "8086"] From c8fc977e4f5a8cb04ce597ca07839843553b0922 Mon Sep 17 00:00:00 2001 From: gunamadura Date: Thu, 29 Aug 2024 00:50:05 +0530 Subject: [PATCH 2/2] impldementing actions --- .github/workflows/integrate.yaml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/integrate.yaml diff --git a/.github/workflows/integrate.yaml b/.github/workflows/integrate.yaml new file mode 100644 index 0000000..3e67b6a --- /dev/null +++ b/.github/workflows/integrate.yaml @@ -0,0 +1,28 @@ +name: Node.js CI + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [18.x, 20.x, 22.x] + # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ + + steps: + - uses: actions/checkout@v4 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + - run: npm ci + - run: npm run build --if-present + - run: npm test \ No newline at end of file