Skip to content
This repository has been archived by the owner on Aug 2, 2023. It is now read-only.

chore(deps): bump semver from 5.7.1 to 5.7.2 #13

chore(deps): bump semver from 5.7.1 to 5.7.2

chore(deps): bump semver from 5.7.1 to 5.7.2 #13

Workflow file for this run

# 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@v3
- 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: Check exists dist directory
id: check-dist
run: |
echo "exists=$(test -d dist && echo true || echo false)" >> $GITHUB_OUTPUT
- name: 📦 Upload artifact
if: steps.check-dist.outputs.exists == 'true'
uses: actions/upload-artifact@v3
with:
name: dist
path: dist