Skip to content
This repository has been archived by the owner on Mar 26, 2024. It is now read-only.

Run direct-minimal-versions tests on a weekly basis #156

Run direct-minimal-versions tests on a weekly basis

Run direct-minimal-versions tests on a weekly basis #156

Workflow file for this run

# This file is generated by .github/cue/ci_tool.cue; DO NOT EDIT!
name: github-actions
"on":
pull_request:
branches:
- main
merge_group:
types:
- checks_requested
env:
CARGO_TERM_COLOR: always
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
changes:
name: detect file changes
permissions:
pull-requests: read
runs-on: ubuntu-latest
outputs:
github-actions: ${{ steps.filter.outputs.github-actions }}
github-actions_files: ${{ steps.filter.outputs.github-actions_files }}
markdown: ${{ steps.filter.outputs.markdown }}
markdown_files: ${{ steps.filter.outputs.markdown_files }}
rust: ${{ steps.filter.outputs.rust }}
rust_files: ${{ steps.filter.outputs.rust_files }}
steps:
- name: Checkout source code
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
with:
fetch-depth: 20
- name: Filter changed repository files
uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50
id: filter
with:
list-files: shell
filters: |
github-actions:
- .github/**/*.yml
- .github/cue/**/*.cue
markdown:
- added|modified: '**/*.md'
rust:
- '**/*.rs'
- '**/Cargo.*'
- .github/workflows/rust.yml
cue_vet:
name: cue / vet
needs:
- changes
runs-on: ubuntu-latest
if: needs.changes.outputs.github-actions == 'true'
steps:
- name: Checkout source code
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
- name: Install CUE v0.5.0
uses: cue-lang/setup-cue@0be332bb74c8a2f07821389447ba3163e2da3bfb
with:
version: v0.5.0
- name: Validate CUE files
working-directory: .github/cue
run: cue vet -c
cue_format:
name: cue / format
needs:
- cue_vet
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
- name: Install CUE v0.5.0
uses: cue-lang/setup-cue@0be332bb74c8a2f07821389447ba3163e2da3bfb
with:
version: v0.5.0
- name: Format CUE files
working-directory: .github/cue
run: cue fmt --simplify
- name: Check if CUE files were reformatted
run: |-
if git diff --quiet HEAD --; then
echo "CUE files were already formatted; the working tree is clean."
else
git diff --color --patch-with-stat HEAD --
echo "***"
echo "Error: CUE files are not formatted; the working tree is dirty."
echo "Run 'cargo xtask fixup.github-actions' locally to format the CUE files."
exit 1
fi
cue_synced:
name: cue / synced
needs:
- cue_vet
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
- name: Install CUE v0.5.0
uses: cue-lang/setup-cue@0be332bb74c8a2f07821389447ba3163e2da3bfb
with:
version: v0.5.0
- name: Regenerate YAML from CUE
working-directory: .github/cue
run: cue cmd regen-ci-yaml
- name: Check if CUE and YAML are in sync
run: |-
if git diff --quiet HEAD --; then
echo "CUE and YAML files are in sync; the working tree is clean."
else
git diff --color --patch-with-stat HEAD --
echo "***"
echo "Error: CUE and YAML files are out of sync; the working tree is dirty."
echo "Run 'cargo xtask fixup.github-actions' locally to regenerate the YAML from CUE."
exit 1
fi
merge_queue:
name: github-actions workflow ready
needs:
- cue_format
- cue_synced
runs-on: ubuntu-latest
if: always()
steps:
- name: 'Check status of job_id: cue_format'
run: |-
RESULT="${{ needs.cue_format.result }}";
if [[ $RESULT == "success" || $RESULT == "skipped" ]]; then
exit 0
else
echo "***"
echo "Error: The required job did not pass."
exit 1
fi
- name: 'Check status of job_id: cue_synced'
run: |-
RESULT="${{ needs.cue_synced.result }}";
if [[ $RESULT == "success" || $RESULT == "skipped" ]]; then
exit 0
else
echo "***"
echo "Error: The required job did not pass."
exit 1
fi