Add Cors #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |