From 51919b6ad02d55671bab2d3f225df27a9f1380e8 Mon Sep 17 00:00:00 2001 From: ramprasathmk Date: Tue, 10 Dec 2024 14:33:40 +0545 Subject: [PATCH] add workflow Signed-off-by: ramprasathmk --- .github/workflows/poet-app_test.yml | 45 +++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .github/workflows/poet-app_test.yml diff --git a/.github/workflows/poet-app_test.yml b/.github/workflows/poet-app_test.yml new file mode 100644 index 0000000..a09332b --- /dev/null +++ b/.github/workflows/poet-app_test.yml @@ -0,0 +1,45 @@ +name: Poet App Test + +on: + pull_request: + branches: + - main + +jobs: + test: + runs-on: ubuntu-latest + # defaults: + # run: + # working-directory: ./ + + strategy: + matrix: + node-version: [20.x] + mongodb-version: ['7.0'] + + env: + PORT: ${{ secrets.PORT }} + MONGODB_URI: ${{ secrets.MONGODB_URI }} + + steps: + - name: Git checkout + uses: actions/checkout@v3 + + - name: Use Node.js ${{ matrix.node-version }} + # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + + - name: Start MongoDB + # See for more info at https://github.com/supercharge/mongodb-github-action/tree/1.11.0/ + uses: supercharge/mongodb-github-action@1.11.0 + with: + mongodb-version: ${{ matrix.mongodb-version }} + + - name: Install Node Dependencies + run: npm install + + - name: Run Test + run: npm test