Merge pull request #37 from lordgrim18/build #3
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: CI | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
services: | |
mongo: | |
image: mongo:latest | |
ports: | |
- 27017:27017 | |
strategy: | |
matrix: | |
node-version: [20.x] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'npm' | |
- name: Install dependencies | |
run: npm ci | |
- name: Create .env file | |
run: | | |
touch .env | |
echo "${{ secrets.DEV_ENV_FILE }}" > .env | |
- name: Verify .env file creation | |
run: ls -la | |
- name: Run tests | |
run: npm test |