Test installation process workflow (software-mansion/protostar)
The Test installation process workflow from software-mansion/protostar, explained and optimized by Latchkey.
CI health: A - excellent
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 Test installation process workflow from the software-mansion/protostar repository, a real project running GitHub Actions. It is shown here with attribution under its MIT license.
Below, Latchkey shows a faster, safer version produced by its optimization engine.
The workflow
name: Test installation process
on:
release:
types: [created]
workflow_dispatch:
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, macos-latest] # TODO: Fix windows gmp.h not found issue, and add a windows binary
steps:
- uses: actions/checkout@v2
- name: Install protostar
run: |
curl -L https://raw.githubusercontent.com/software-mansion/protostar/master/install.sh | bash
- name: Update env variables
run: |
source /home/runner/.bashrc | bash
- name: Verify protostar is available from console
run: |
protostar --help | bash
The same workflow, on Latchkey
Removes redundant runs and caps runaway jobs. Added and changed lines are highlighted.
name: Test installation process on: release: types: [created] workflow_dispatch: jobs: build: timeout-minutes: 30 runs-on: ${{ matrix.os }} strategy: matrix: os: [ubuntu-20.04, macos-latest] # TODO: Fix windows gmp.h not found issue, and add a windows binary steps: - uses: actions/checkout@v2 - name: Install protostar run: | curl -L https://raw.githubusercontent.com/software-mansion/protostar/master/install.sh | bash - name: Update env variables run: | source /home/runner/.bashrc | bash - name: Verify protostar is available from console run: | protostar --help | bash
What changed
- Add a job timeout so a hung step cannot burn hours of runner time.
What Latchkey heals here
This workflow has steps that commonly fail on transient issues (network, registries, flaky browsers). On Latchkey managed runners they are detected, retried, and self-healed instead of failing your build:
- Network fetches
This workflow runs 1 job (2 with the matrix expanded) per trigger. On Latchkey the same minutes cost up to 58% less than GitHub-hosted, with zero queue time.