Skip to content

Commit

Permalink
Refactor GitHub Actions workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
KentarouTakeda committed Dec 26, 2023
1 parent 3fbe701 commit 1e9e083
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 21 deletions.
14 changes: 4 additions & 10 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,12 @@ jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- run: touch package-lock.json
- uses: actions/setup-node@v4
with:
node-version: 16
registry-url: 'https://registry.npmjs.org'
- uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.OS }}-node-
${{ runner.OS }}-
cache: 'npm'
- run: npm install
- run: npm test
- run: npm run build
Expand Down
15 changes: 4 additions & 11 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,18 @@ on:
branches:
- master
push:
branches:
- master
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
version: [14, 16, 18]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- run: touch package-lock.json
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.version }}
- uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.OS }}-node-
${{ runner.OS }}-
cache: 'npm'
- run: npm install
- run: npm test

0 comments on commit 1e9e083

Please sign in to comment.