Skip to content

Commit 0b7d37d

Browse files
authored
Merge pull request #9 from fiatlinuxorg/CI_CD
merge CI_CD into main
2 parents ec21df5 + 815ac72 commit 0b7d37d

1 file changed

Lines changed: 41 additions & 0 deletions

File tree

.github/workflows/tests.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
3+
4+
name: Node.js CI
5+
6+
on:
7+
push:
8+
branches: [ "main", "CI_CD" ]
9+
pull_request:
10+
branches: [ "main" ]
11+
workflow_dispatch:
12+
13+
jobs:
14+
build:
15+
16+
runs-on: ubuntu-latest
17+
18+
strategy:
19+
matrix:
20+
node-version: [ 22.x]
21+
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
22+
23+
steps:
24+
- uses: actions/checkout@v4
25+
- name: Use Node.js ${{ matrix.node-version }}
26+
uses: actions/setup-node@v4
27+
with:
28+
node-version: ${{ matrix.node-version }}
29+
cache: 'npm'
30+
- run: |
31+
echo "TZ=UTC" >> .env
32+
echo "PORT=8000" >> .env
33+
echo "HOST=localhost" >> .env
34+
echo "LOG_LEVEL=info" >> .env
35+
echo "NODE_ENV=development" >> .env
36+
echo "SESSION_DRIVER=cookie" >> .env
37+
echo "MONGO_URI=mongodb://localhost:27017/citium" >> .env
38+
echo "JWT_SECRET=$(openssl rand -base64 32)" >> .env
39+
- run: npm ci
40+
- run: node ace generate:key
41+
- run: node ace test

0 commit comments

Comments
 (0)