Merge pull request #44 from traPtitech/fix/file_uploader_accept #137
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, pull_request] | |
jobs: | |
packages: | |
name: Client Packages | |
runs-on: ubuntu-latest | |
env: | |
CI: true | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: Cache node modules | |
id: cache-npm | |
uses: actions/cache@v3 | |
with: | |
path: node_modules | |
key: ${{ runner.os }}-node_modules-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node_modules- | |
- name: Install npm packages | |
if: steps.cache-npm.outputs.cache-hit != 'true' | |
run: npm ci | |
- name: Generate api | |
run: npm run gen-api | |
build: | |
name: Client Build | |
runs-on: ubuntu-latest | |
needs: [packages] | |
env: | |
CI: true | |
NODE_ENV: production | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: Cache node modules | |
id: cache-npm | |
uses: actions/cache@v3 | |
with: | |
path: node_modules | |
key: ${{ runner.os }}-node_modules-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node_modules-\ | |
- name: Generate api | |
run: npm run gen-api | |
- name: build | |
run: npm run build | |
lint: | |
name: Client Lint | |
runs-on: ubuntu-latest | |
needs: [packages] | |
env: | |
CI: true | |
NODE_ENV: production | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: Cache node modules | |
id: cache-npm | |
uses: actions/cache@v3 | |
with: | |
path: node_modules | |
key: ${{ runner.os }}-node_modules-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node_modules- | |
- name: Generate api | |
run: npm run gen-api | |
- run: npm run lint |