chore(deps): update dependency @types/node to v18.18.4 #867
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Node.js v14 と v16 でビルド・テストを実行する | |
name: Node CI | |
on: | |
push: | |
branches: | |
- main | |
- master | |
pull_request: | |
branches: | |
- main | |
- master | |
jobs: | |
ci: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
node: [16] | |
steps: | |
- name: 🛎 Checkout | |
uses: actions/checkout@v4 | |
- name: 🏗 Setup node env | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node }} | |
- name: 📃 Check package.json definition | |
id: package-json | |
run: | | |
compile=$(cat package.json | jq '.scripts | has("compile")') | |
build=$(cat package.json | jq '.scripts | has("build")') | |
generate=$(cat package.json | jq '.scripts | has("generate")') | |
package=$(cat package.json | jq '.scripts | has("package")') | |
lint=$(cat package.json | jq '.scripts | has("lint")') | |
test=$(cat package.json | jq '.scripts | has("test")') | |
echo "compile: $compile" | |
echo "build: $build" | |
echo "generate: $generate" | |
echo "package: $package" | |
echo "lint: $lint" | |
echo "test: $test" | |
echo "compile=$compile" >> $GITHUB_OUTPUT | |
echo "build=$build" >> $GITHUB_OUTPUT | |
echo "generate=$generate" >> $GITHUB_OUTPUT | |
echo "package=$package" >> $GITHUB_OUTPUT | |
echo "lint=$lint" >> $GITHUB_OUTPUT | |
echo "test=$test" >> $GITHUB_OUTPUT | |
- name: 🛠 Get yarn cache directory path | |
id: yarn-cache-dir-path | |
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT | |
- name: 📦 Cache node_modules | |
uses: actions/cache@v3 | |
id: yarn-cache | |
with: | |
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn- | |
- name: 👨🏻💻 Install dependencies | |
run: yarn | |
- name: 👀 Run linter | |
if: steps.package-json.outputs.lint == 'true' | |
run: yarn lint | |
- name: 🎁 Run package | |
if: steps.package-json.outputs.package == 'true' | |
run: yarn package | |
- name: 🏃 Run compile | |
if: steps.package-json.outputs.compile == 'true' | |
run: yarn compile | |
- name: 🏗️ Run build & generate (Nuxt.js) | |
if: steps.package-json.outputs.build == 'true' && steps.package-json.outputs.generate == 'true' | |
run: | | |
yarn build | |
yarn generate | |
- name: 🧪 Run tests | |
if: steps.package-json.outputs.test == 'true' | |
run: yarn test | |
- name: ☑️ Check Dependencies | |
run: npx depcheck | |
- name: Upload artifact | |
if: ${{ github.event_name == 'push' }} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: destination-channel.js | |
path: output/index.js |