DEBUG: test.ymlでこのブランチのpushも実行対象にする #32
Workflow file for this run
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: Test | |
on: | |
push: | |
branches: | |
- n-air_development | |
- bump-ava # テスト確認用 | |
paths: | |
- package.json | |
- yarn.lock | |
- installer.nsh | |
- tsconfig.json | |
- webpack.config.js | |
- main.js | |
- test-main.js | |
- app/** | |
- bin/package.json | |
- bin/yarn.lock | |
- bin/**/*.js | |
- media/** | |
- nvoice/** | |
- obs-api/** | |
- scripts/** | |
- test/** | |
- updater/** | |
- vendor/** | |
- .github/workflows/test.yml | |
pull_request: | |
paths: | |
- package.json | |
- yarn.lock | |
- installer.nsh | |
- tsconfig.json | |
- webpack.config.js | |
- main.js | |
- test-main.js | |
- app/** | |
- bin/package.json | |
- bin/yarn.lock | |
- bin/**/*.js | |
- media/** | |
- nvoice/** | |
- obs-api/** | |
- scripts/** | |
- test/** | |
- updater/** | |
- vendor/** | |
- .github/workflows/test.yml | |
jobs: | |
setup-app: | |
name: setup(app) | |
runs-on: windows-2019 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: cache node modules | |
id: cache-node-modules | |
uses: actions/cache@v4 | |
with: | |
path: node_modules | |
key: ${{ runner.os }}-node-${{ hashFiles('yarn.lock', 'scripts/preinstall.js', 'scripts/install-native-deps.js', 'scripts/repositories.json') }} | |
- name: npm login | |
run: echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" >> $env:USERPROFILE\.npmrc | |
- name: Install dependencies | |
if: steps.cache-node-modules.outputs.cache-hit != 'true' | |
run: yarn install --frozen-lockfile --check-files | |
setup-bin: | |
name: setup(bin) | |
runs-on: windows-2019 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: cache node modules(bin) | |
id: cache-node-modules-bin | |
uses: actions/cache@v4 | |
with: | |
path: bin/node_modules | |
key: ${{ runner.os }}-node-bin-${{ hashFiles('bin/yarn.lock') }} | |
- name: Install dependencies | |
if: steps.cache-node-modules-bin.outputs.cache-hit != 'true' | |
run: yarn install --cwd=bin --frozen-lockfile --check-files | |
unit_test-app: | |
name: unit tests(app) | |
needs: setup-app | |
runs-on: windows-2019 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: cache node modules | |
id: cache-node-modules | |
uses: actions/cache@v4 | |
with: | |
path: node_modules | |
key: ${{ runner.os }}-node-${{ hashFiles('yarn.lock', 'scripts/preinstall.js', 'scripts/install-native-deps.js', 'scripts/repositories.json') }} | |
- name: Run unit tests(app) | |
run: yarn test:unit:app | |
unit_test-bin: | |
name: unit tests(bin) | |
needs: [setup-app, setup-bin] | |
runs-on: windows-2019 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: cache node modules | |
id: cache-node-modules | |
uses: actions/cache@v4 | |
with: | |
path: node_modules | |
key: ${{ runner.os }}-node-${{ hashFiles('yarn.lock', 'scripts/preinstall.js', 'scripts/install-native-deps.js', 'scripts/repositories.json') }} | |
- name: cache node modules(bin) | |
id: cache-node-modules-bin | |
uses: actions/cache@v4 | |
with: | |
path: bin/node_modules | |
key: ${{ runner.os }}-node-bin-${{ hashFiles('bin/yarn.lock') }} | |
- name: Run unit tests(bin) | |
run: yarn test:unit:bin | |
e2e_test: | |
name: e2e tests | |
needs: setup-app | |
runs-on: windows-2019 | |
strategy: | |
matrix: | |
directory: | |
- 'test-dist/test/e2e/*.js' | |
- 'test-dist/test/api/*.js' | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: cache node modules | |
id: cache-node-modules | |
uses: actions/cache@v4 | |
with: | |
path: node_modules | |
key: ${{ runner.os }}-node-${{ hashFiles('yarn.lock', 'scripts/preinstall.js', 'scripts/install-native-deps.js', 'scripts/repositories.json') }} | |
- name: Compile | |
run: yarn compile:ci | |
- name: Run e2e tests | |
run: yarn test --fail-fast ${{ matrix.directory }} |