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