Shared cli/server fortio workflows workflow (fortio/fortio)
The Shared cli/server fortio workflows workflow from fortio/fortio, explained and optimized by Latchkey.
CI health: C - fair
Run this on Latchkey for self-healing, caching, and up to 58% lower cost.
Grade your own workflow free or run it on Latchkey →What it does
This is the Shared cli/server fortio workflows workflow from the fortio/fortio repository, a real project running GitHub Actions. It is shown here with attribution under its Apache-2.0 license.
Below, Latchkey shows a faster, safer version produced by its optimization engine.
The workflow
# Main fortio still use its own build image for now (including linux/ppc64le,linux/s390x additional platforms)
name: "Shared cli/server fortio workflows"
on:
push:
branches: [ master ]
tags:
# so a vX.Y.Z-test1 doesn't trigger build
- 'v[0-9]+.[0-9]+.[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+-pre*'
pull_request:
branches: [ master ]
jobs:
call-gochecks:
uses: fortio/workflows/.github/workflows/gochecks.yml@main
call-codecov:
uses: fortio/workflows/.github/workflows/codecov.yml@main
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
call-codeql:
uses: fortio/workflows/.github/workflows/codeql-analysis.yml@main
permissions:
actions: read
contents: read
security-events: write
# call-releaser:
# if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
# uses: fortio/workflows/.github/workflows/releaser.yml@main
# with:
# description: "Fortio load testing library, command line tool, advanced echo server and web UI in go (golang)"
# secrets:
# GH_PAT: ${{ secrets.GH_PAT }}
# DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}
# DOCKER_USER: ${{ secrets.DOCKER_USER }}
The same workflow, on Latchkey
Removes redundant runs and caps runaway jobs. Added and changed lines are highlighted.
# Main fortio still use its own build image for now (including linux/ppc64le,linux/s390x additional platforms) name: "Shared cli/server fortio workflows" on: push: branches: [ master ] tags: # so a vX.Y.Z-test1 doesn't trigger build - 'v[0-9]+.[0-9]+.[0-9]+' - 'v[0-9]+.[0-9]+.[0-9]+-pre*' pull_request: branches: [ master ] concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: call-gochecks: timeout-minutes: 30 uses: fortio/workflows/.github/workflows/gochecks.yml@main call-codecov: timeout-minutes: 30 uses: fortio/workflows/.github/workflows/codecov.yml@main secrets: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} call-codeql: timeout-minutes: 30 uses: fortio/workflows/.github/workflows/codeql-analysis.yml@main permissions: actions: read contents: read security-events: write # call-releaser: # if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') # uses: fortio/workflows/.github/workflows/releaser.yml@main # with: # description: "Fortio load testing library, command line tool, advanced echo server and web UI in go (golang)" # secrets: # GH_PAT: ${{ secrets.GH_PAT }} # DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }} # DOCKER_USER: ${{ secrets.DOCKER_USER }}
What changed
- Cancel superseded runs when a branch or PR gets a newer push.
- Add a job timeout so a hung step cannot burn hours of runner time.
1 third-party action is referenced by a movable tag. Pin it to the commit SHA (Latchkey resolves and applies this automatically) so a repointed tag cannot change what runs.
This workflow runs 3 jobs per trigger. On Latchkey the same minutes cost up to 58% less than GitHub-hosted, with zero queue time.