Merge: main -> env/prod (#241 状態の問い合わせが終わるまでおみくじを引けなくする) #436
This file contains hidden or 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
| on: | |
| push: | |
| env: | |
| DOCKER_BUILDKIT: 1 | |
| COMPOSE_DOCKER_CLI_BUILD: 1 | |
| GCP_KEY_PATH: "/tmp/key.json" | |
| jobs: | |
| actions-test: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Run actionlint | |
| shell: bash | |
| run: | | |
| set -ex | |
| bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash) | |
| ./actionlint -color | |
| build: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: setup node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "18" | |
| - name: cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.npm | |
| key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-node- | |
| - name: nuxt setup | |
| run: echo "${{ secrets.DEV_ENV }}" > .env | |
| working-directory: ./web | |
| - name: nuxt generate | |
| run: | | |
| set -ex | |
| yarn | |
| yarn generate | |
| working-directory: ./web | |
| - name: copy files | |
| run: | | |
| set -ex | |
| rm -rf app/dist | |
| cp -r web/dist app | |
| working-directory: ./ | |
| - name: firebase setup | |
| run: | | |
| set -ex | |
| npm install -g firebase-tools | |
| npm install | |
| working-directory: ./app/functions | |
| test: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: setup node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "18" | |
| - name: cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.npm | |
| key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-node- | |
| # テストは performance.js(moment のみ依存)を検証するため、 | |
| # canvas 等のネイティブビルド(OGP生成専用)は不要。--ignore-scripts で高速・堅牢化する。 | |
| - name: install functions deps | |
| run: npm install --ignore-scripts | |
| working-directory: ./app/functions | |
| - name: run functions tests | |
| run: npm test | |
| working-directory: ./app/functions |