Skip to content

Create build-and-push.yml #1

Create build-and-push.yml

Create build-and-push.yml #1

Workflow file for this run

name: Unit Test
on:
push:
branches:
- master
jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
node: [14, 16, 18]
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
path: ./geoip # Set the path to your project root directory
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- name: Install dependencies
run: npm install
working-directory: ./geoip/server # Set the working directory to your project root
- name: Run jest test
run: npx jest --coverage
working-directory: ./geoip/server # Set the working directory to your project root
- name: Upload test results
uses: actions/upload-artifact@v2
with:
name: test-results
path: ./geoip/coverage