Skip to content

Reports

Reports #881

Workflow file for this run

name: Reports
on:
workflow_dispatch: {}
schedule:
- cron: '0 6 * * *'
push:
branches:
- main
jobs:
run:
runs-on: ubuntu-latest
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: ${{ secrets.AWS_REGION }}
TRINO_VERSION: 418
TRINO_GIT_VERSION: "0.46"
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: |
sudo apt update
sudo pip install csv2md ansi2html
curl -fLOsS https://github.com/nineinchnick/trino-git/releases/download/v$TRINO_GIT_VERSION/trino-git-$TRINO_GIT_VERSION.zip
unzip trino-git-$TRINO_GIT_VERSION.zip
- name: Start Trino
run: |
CONTAINER_ID=$(docker run \
-v $(pwd)/trino-git-$TRINO_GIT_VERSION:/usr/lib/trino/plugin/git \
-v $(pwd)/catalog/git.properties:/etc/trino/catalog/git.properties \
-v $(pwd)/catalog/trinocicd.properties:/etc/trino/catalog/trinocicd.properties \
-v $(pwd)/hive-cache:/opt/hive-cache \
-e AWS_ACCESS_KEY_ID \
-e AWS_SECRET_ACCESS_KEY \
-e AWS_REGION \
-p 8080:8080 \
--name trino \
-d \
trinodb/trino:$TRINO_VERSION)
SERVER_IP=$(docker inspect --format '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' "$CONTAINER_ID")
echo "CONTAINER_ID=$CONTAINER_ID" >> $GITHUB_ENV
echo "SERVER_IP=$SERVER_IP" >> $GITHUB_ENV
until docker logs trino 2>&1 | grep --quiet --fixed-strings --max-count=1 "SERVER STARTED"; do sleep 1 ; done
docker logs trino
- name: Execute queries
run: |
./bin/reports.sh reports/ci-cd/index.md "Trino CI/CD Reports" sql/ci-cd/{health,success-ratio-per-day,runs-queue-time-per-day,runs-duration-per-day,runs-job-cumulative-duration-per-day,concurrent-jobs-per-day,jobs-duration}.sql
./bin/reports.sh reports/flaky/index.md "Trino Flaky Tests" sql/flaky/{jobs,jobs-week,tests,classes}.sql
./bin/reports.sh reports/pr/index.md "Trino PR Reports" sql/pr/{idents,burndown,authors-per-month,changes-per-month,prs-per-author,reviewers-per-pr,reviews-per-author-assoc,top-reviewers,top-authors,top-mergers,sith-lords,mergers-authors,reviewers-top-authors,time-to-merge,time-to-merge-per-size,avg-time-to-merge,time-to-first-review,avg-time-to-first-review,reviewer-responsiveness,author-responsiveness,open-pr-age,awaiting-review,inactivity-on-prs,abandoned-prs,running-prs,stale-prs}.sql
- name: Commit report
run: |
git config --global user.name 'Jan Was'
git config --global user.email '[email protected]'
git add --all reports/
git commit -m "Automated report"
git push