Skip to content

Commit

Permalink
chore: replace yarn to npm
Browse files Browse the repository at this point in the history
  • Loading branch information
solufa committed Aug 6, 2023
1 parent b04cd2f commit a66bb11
Show file tree
Hide file tree
Showing 4 changed files with 12,145 additions and 7,651 deletions.
75 changes: 37 additions & 38 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16, 18]
node-version: [18, 20]
services:
postgres:
image: postgres
Expand All @@ -28,39 +28,38 @@ jobs:
TEST_MYSQL_USER: root
TEST_MYSQL_PASSWORD: root
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- uses: actions/cache@v2
id: yarn-cache
id: npm-cache
with:
path: 'node_modules'
key: ${{ runner.os }}-node-v${{ matrix.node-version }}-yarn-${{ hashFiles('yarn.lock') }}-3
- run: yarn --frozen-lockfile
if: steps.yarn-cache.outputs.cache-hit != 'true'
- run: yarn lint
- run: yarn build
- run: yarn typecheck
path: "node_modules"
key: ${{ runner.os }}-node-v${{ matrix.node-version }}-npm-${{ hashFiles('package-lock.json') }}
- run: npm install
if: steps.npm-cache.outputs.cache-hit != 'true'
- run: npm run lint
- run: npm run build
- run: npm run typecheck

- run: |
sudo systemctl start mysql.service
- run: yarn test
- run: sudo systemctl start mysql.service
- run: npm test
env:
TEST_CFA_RANDOM_NUM: 1
TEST_CFA_FIX_DB: postgresql
TEST_CFA_FIX_ORM: prisma
- run: yarn test
- run: npm test
env:
TEST_CFA_RANDOM_NUM: 1
TEST_CFA_FIX_DB: mysql
TEST_CFA_FIX_ORM: typeorm
- run: yarn test
- run: npm test
env:
TEST_CFA_RANDOM_NUM: 1
TEST_CFA_FIX_DB: sqlite
- run: yarn test
- run: npm test
if: github.event_name == 'schedule'
env:
TEST_CFA_RANDOM_NUM: 5
Expand All @@ -74,26 +73,26 @@ jobs:
matrix:
node-version: [18]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- uses: actions/cache@v2
id: yarn-cache
id: npm-cache
with:
path: 'node_modules'
key: ${{ runner.os }}-node-v${{ matrix.node-version }}-yarn-${{ hashFiles('yarn.lock') }}-3
- run: echo 'network-timeout 1000000' >> ~/.yarnrc
- run: yarn --frozen-lockfile --network-timeout 1000000
if: steps.yarn-cache.outputs.cache-hit != 'true'
- run: yarn build
- run: yarn typecheck
- run: yarn test
path: "node_modules"
key: ${{ runner.os }}-node-v${{ matrix.node-version }}-npm-${{ hashFiles('package-lock.json') }}
- run: echo 'fetch-timeout=1000000' >> ~/.npmrc
- run: npm install
if: steps.npm-cache.outputs.cache-hit != 'true'
- run: npm run build
- run: npm run typecheck
- run: npm test
env:
TEST_CFA_RANDOM_NUM: 1
TEST_CFA_FIX_DB: sqlite
- run: yarn test
- run: npm test
if: github.event_name == 'schedule'
env:
TEST_CFA_RANDOM_NUM: 5
Expand All @@ -104,21 +103,21 @@ jobs:
needs: [test, test-win]
if: startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: '18.x'
node-version: 18
registry-url: 'https://registry.npmjs.org'
- uses: actions/cache@v2
id: yarn-cache
id: npm-cache
with:
path: 'node_modules'
key: ${{ runner.os }}-node-v18-yarn-${{ hashFiles('yarn.lock') }}
- run: echo 'network-timeout 1000000' >> ~/.yarnrc
- run: yarn --frozen-lockfile --network-timeout 1000000
if: steps.yarn-cache.outputs.cache-hit != 'true'
- run: yarn build
key: ${{ runner.os }}-node-v18-npm-${{ hashFiles('package-lock.json') }}
- run: echo 'fetch-timeout=1000000' >> ~/.npmrc
- run: npm install
if: steps.npm-cache.outputs.cache-hit != 'true'
- run: npm run build
- run: |
VERSION="$(node -e 'console.log(process.argv[1].match(/^refs\/tags\/v(\d+\.\d+\.\d+)$/)[1])' "${{ github.ref }}")"
node -e 'console.log(JSON.stringify({...require("./package.json"),version:process.argv[1]}, null, 2))' "$VERSION" | tee ./tmp-package.json
Expand Down
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ tsconfig.tsbuildinfo

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# local env files
/.env
Expand Down
Loading

0 comments on commit a66bb11

Please sign in to comment.