Skip to content

Commit

Permalink
CI fixing
Browse files Browse the repository at this point in the history
  • Loading branch information
MrRefactoring committed Feb 25, 2024
1 parent 1152f3e commit a3715b8
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 10 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ jobs:
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Installing dependencies
run: npm ci
- name: Linting
run: npm run lint
env:
Expand All @@ -45,6 +51,12 @@ jobs:
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Installing dependencies
run: npm ci
- name: Running unit tests
run: npm run test:unit

Expand All @@ -61,6 +73,12 @@ jobs:
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Installing dependencies
run: npm ci
- name: Creating `.env` file
run: |
touch .env
Expand Down
42 changes: 32 additions & 10 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ jobs:
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Use Node.js 18.x.x
uses: actions/setup-node@v3
with:
node-version: 18
- name: Installing dependencies
run: npm ci
- name: Linting
run: npm run lint
env:
Expand All @@ -36,6 +42,12 @@ jobs:
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Use Node.js 18.x.x
uses: actions/setup-node@v3
with:
node-version: 18
- name: Installing dependencies
run: npm ci
- name: Running unit tests
run: npm run test:unit

Expand All @@ -46,8 +58,14 @@ jobs:
- test_unit
runs-on: ubuntu-latest
steps:
- name: Checkout sources # Added checkout step
- name: Checkout sources
uses: actions/checkout@v4
- name: Use Node.js 18.x.x
uses: actions/setup-node@v3
with:
node-version: 18
- name: Installing dependencies
run: npm ci
- name: Creating `.env` file
run: |
touch .env
Expand All @@ -63,8 +81,14 @@ jobs:
- test_integration
runs-on: ubuntu-latest
steps:
- name: Checkout sources # Added checkout step
- name: Checkout sources
uses: actions/checkout@v4
- name: Use Node.js 18.x.x
uses: actions/setup-node@v3
with:
node-version: 18
- name: Installing dependencies
run: npm ci
- name: Publishing
run: npm publish
env:
Expand All @@ -76,22 +100,22 @@ jobs:
- publish
runs-on: ubuntu-latest
steps:
- name: Checkout code # Revised to 'Checkout sources'
- name: Checkout code
uses: actions/checkout@v4
with:
ref: master
- name: Set up Node.js
- name: Use Node.js 18.x.x
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install dependencies
- name: Installing dependencies
run: npm ci
- name: Generate docs
run: npm run doc
- name: Extract version
id: pkg
run: echo "VERSION=$(node -p "require('./package.json').version")" >> $GITHUB_ENV
- name: Checkout docs branch # Checkout step adjusted for docs branch
- name: Checkout docs branch
uses: actions/checkout@v4
with:
ref: docs
Expand All @@ -115,9 +139,7 @@ jobs:
steps:
- name: Checkout sources
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Node.js
- name: Use Node.js 18.x.x
uses: actions/setup-node@v4
with:
node-version: 18
Expand All @@ -139,7 +161,7 @@ jobs:
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Set up Node.js
- name: Use Node.js 18.x.x
uses: actions/setup-node@v4
with:
node-version: 18
Expand Down

0 comments on commit a3715b8

Please sign in to comment.