Skip to content

Commit

Permalink
build: make nix shell as development environment
Browse files Browse the repository at this point in the history
Signed-off-by: Husen <[email protected]>
  • Loading branch information
heyhusen committed Nov 17, 2023
1 parent d0f826a commit 7163af8
Show file tree
Hide file tree
Showing 7 changed files with 6,729 additions and 5,410 deletions.
28 changes: 17 additions & 11 deletions .github/workflows/node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,49 +22,55 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node: ['18']
node: ['18', '20']
env:
FOLDER: node

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up pnpm
uses: pnpm/action-setup@v2
with:
version: 8
run_install: false

- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: 'yarn'
cache-dependency-path: ${{ env.FOLDER }}/yarn.lock
cache: 'pnpm'
cache-dependency-path: ${{ env.FOLDER }}/pnpm-lock.yaml

- name: Install dependencies
run: |
cd ${{ env.FOLDER }}
yarn install
pnpm i
- name: Run linter
run: |
cd ${{ env.FOLDER }}
yarn lint
pnpm lint
- name: Run prettier
run: |
cd ${{ env.FOLDER }}
yarn prettier
pnpm prettier
- name: Run build
run: |
cd ${{ env.FOLDER }}
yarn build
pnpm build
- name: Run tests
run: |
cd ${{ env.FOLDER }}
cp .env.example .env
docker compose up -d
sleep 10s
yarn migrate:up
yarn seed:run
yarn test
pnpm migrate:up
pnpm seed:run
pnpm test
docker compose down -v
7 changes: 2 additions & 5 deletions node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"private": true,
"license": "Apache-2.0",
"author": {
"name": "Ahmad Husen",
"name": "Husen",
"email": "[email protected]",
"url": "https://husen.id"
},
Expand Down Expand Up @@ -75,8 +75,5 @@
"volta": {
"node": "18.17.1",
"yarn": "1.22.19"
},
"workspaces": [
"src/infrastructure/server/*"
]
}
}
Loading

0 comments on commit 7163af8

Please sign in to comment.