Skip to content

Commit

Permalink
feat(ci): load env with github action, run test:ci script
Browse files Browse the repository at this point in the history
  • Loading branch information
karrui committed Oct 11, 2024
1 parent 5af8367 commit dd2e0f6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ jobs:
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }}
- run: npm ci
- run: npm run test:docker
- name: Load .env file
uses: xom9ikk/dotenv@v2
with:
mode: test
# Not using Datadog Test Visibility action since we need to use the local
# (patched) package for it to work with neverthrow
- name: run tests
Expand All @@ -99,7 +103,7 @@ jobs:
DD_SERVICE: isomer
DD_API_KEY: ${{ secrets.DD_API_KEY }}
DD_CIVISIBILITY_AUTO_INSTRUMENTATION_PROVIDER: github
run: . .env.test && npx jest -- --runInBand --coverage
run: npm run test:ci

gatekeep:
name: Determine if Build & Deploy is needed
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"dev": "source .env && docker compose -f docker-compose.dev.yml up",
"test:docker": "docker run -d -p 54321:5432 --name postgres -e POSTGRES_USER=isomer -e POSTGRES_PASSWORD=password -e POSTGRES_DB=isomercms_test postgres:latest",
"test": "source .env.test && jest --runInBand",
"test:ci": "jest --runInBand --coverage",
"release": "bash scripts/release_prep.sh",
"lint": "npx eslint .",
"lint-fix": "eslint --ignore-path .gitignore . --fix",
Expand Down

0 comments on commit dd2e0f6

Please sign in to comment.