feat(goods-list): グッズのソート (グループA) #45
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
name: CI | |
on: | |
push: | |
jobs: | |
# 自動デプロイのためのビルド (main ブランチのみ) | |
build-for-deploy: | |
if: startsWith(github.ref, 'refs/heads/main') | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Install Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: Install dependencies | |
run: npm install --legacy-peer-deps | |
env: | |
CI: true | |
- name: Build app | |
run: | | |
REPOSITORY_NAME=$(echo '${{ github.repository }}' | awk -F '/' '{print $2}') | |
npm run build | |
cp -r dist/ docs/ | |
cp docs/index.html docs/404.html | |
- name: Upload app to gh-pages branch | |
uses: JamesIves/github-pages-deploy-action@ba1486788b0490a235422264426c45848eac35c6 | |
with: | |
branch: gh-pages | |
folder: docs/ | |
# テスト | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Install Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: Install dependencies | |
run: npm install --legacy-peer-deps | |
env: | |
CI: true | |
- name: Run tests | |
run: npm test -- --ci --no-cache --reporters=default --reporters=jest-junit | |
- name: Upload test report | |
uses: dorny/test-reporter@c9b3d0e2bd2a4e96aaf424dbaa31c46b42318226 | |
if: always() | |
with: | |
name: "Test Report" | |
path: "jest-junit.xml" | |
fail-on-error: "true" | |
reporter: "jest-junit" |