Merge pull request #793 from isucon/perl_fix_utf8 #282
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: Perl CI | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- bench/**/* | |
- webapp/perl/**/* | |
- .github/workflows/perl.yml | |
- development/compose-perl.yml | |
- development/dockerfiles/Dockerfile.perl | |
pull_request: | |
paths: | |
- bench/**/* | |
- webapp/perl/**/* | |
- .github/workflows/perl.yml | |
- development/compose-perl.yml | |
- development/dockerfiles/Dockerfile.perl | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
name: Build | |
runs-on: codebuild-problem-github-actions-${{ github.run_id }}-${{ github.run_attempt }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version-file: 'bench/go.mod' | |
cache-dependency-path: | | |
./bench/go.sum | |
- name: Install Task | |
uses: arduino/setup-task@v2 | |
with: | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
- uses: docker/setup-buildx-action@v3 | |
with: | |
driver-opts: image=mirror.gcr.io/moby/buildkit:buildx-stable-1 | |
buildkitd-config-inline: | | |
[registry."docker.io"] | |
mirrors = ["mirror.gcr.io"] | |
- name: Build webapp | |
uses: docker/bake-action@v5 | |
with: | |
push: false | |
load: true | |
workdir: ./development | |
files: compose-perl.yml | |
set: | | |
webapp.cache-from=type=gha,scope=webapp-perl-cache | |
webapp.cache-to=type=gha,scope=webapp-perl-cache,mode=max | |
- uses: pnpm/action-setup@v4 | |
name: Install pnpm | |
with: | |
version: 9 | |
run_install: false | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: pnpm | |
cache-dependency-path: "frontend/pnpm-lock.yaml" | |
- name: Build bench | |
working-directory: ./bench | |
run: | | |
task gen-frontend | |
task build | |
- name: Setup webapp/perl | |
working-directory: ./development | |
run: | | |
sudo docker compose -f compose-perl.yml up -d --wait | |
- name: Run bench | |
working-directory: ./bench | |
run: | | |
task run-local -- --fail-on-error --payment-url http://host.docker.internal:12345 | |
- name: Down webapp/go | |
working-directory: ./development | |
if: ${{ always() }} | |
run: | | |
sudo docker compose -f compose-perl.yml down -v |