Skip to content

Add continue-on-error flag for benchmark job #24

Add continue-on-error flag for benchmark job

Add continue-on-error flag for benchmark job #24

Workflow file for this run

name: CI
on: [push]
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Cache Docker layers
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Cache make init results
uses: actions/cache@v4
with:
path: |
webapp/sql/dump.sql
benchmarker/userdata/img
key: ${{ runner.os }}-make-init-${{ hashFiles('Makefile')}}
restore-keys: |
${{ runner.os }}-make-init-
- name: Initialize the project
run: make init
- name: Check for changes in golang directory
id: check-changes
run: |
if git diff --name-only ${{ github.sha }} | grep 'golang/'; then
echo "Changes detected in golang directory"
echo "::set-output name=go_changes_detected::true"
fi
- name: Update compose.yml if changes are detected
if: steps.check-changes.outputs.go_changes_detected == 'true'
run: |
sed -i 's|build: ruby/|build: golang/|' ./webapp/compose.yml
- name: Start the server
run: |
cd webapp
docker compose up -d
- name: Run the benchmark
continue-on-error: true
run: |
cd benchmarker
docker build -t private-isu-benchmarker .
docker run --network host --add-host host.docker.internal:host-gateway -i private-isu-benchmarker /opt/go/bin/benchmarker -t http://host.docker.internal -u /opt/go/userdata
- name: Show logs
run: |
cd webapp
docker compose logs