Skip to content

feat: add a workflow that checks for rust version drift #10

feat: add a workflow that checks for rust version drift

feat: add a workflow that checks for rust version drift #10

name: Check upstream `lurk-rs` compiles
on:
workflow_call:
inputs:
runner:
required: false
default: 'ubuntu-latest'
type: string
package-name:
required: false
type: string
jobs:
check-lurk-compiles:

Check failure on line 15 in .github/workflows/check-lurk-compiles.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/check-lurk-compiles.yml

Invalid workflow file

You have an error in your yaml syntax on line 15
if: github.event_name == 'pull_request'
runs-on: ${{ inputs.runner }}
steps:
- uses: actions/checkout@v4
with:
repository: lurk-lab/ci-workflows
- uses: ./.github/actions/ci-env
- uses: actions/checkout@v4
with:
path: ${{ github.workspace }}/${{ github.repository }}
- uses: actions/checkout@v4
with:
repository: lurk-lab/lurk-rs
path: ${{ github.workspace }}/lurk
submodules: recursive
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Patch Cargo.toml
working-directory: ${{ github.workspace }}/lurk
run: |
REPOSITORY_NAME=$(echo ${{ github.repository }} | awk -F'/' '{ print $2 }')
echo "[patch.'https://github.com/${{ github.repository }}']" >> Cargo.toml
if [ ! -z "${{ inputs.package-name }}" ];
then
echo " = { path='../$REPOSITORY_NAME', package='${{ inputs.package-name }}' }" >> Cargo.toml
else
echo " = { path='../$REPOSITORY_NAME' }" >> Cargo.toml
fi
- name: Check Lurk-rs types don't break spectacularly
working-directory: ${{ github.workspace }}/lurk
run: cargo check --workspace --tests --benches --examples