Skip to content

Some functions related to badges/ranks #764

Some functions related to badges/ranks

Some functions related to badges/ranks #764

Workflow file for this run

name: Check Symbols
on:
pull_request:
paths:
- 'symbols/**.yml'
- 'src/**.rs'
- 'Cargo.toml'
branches:
- master
workflow_call:
inputs:
no-format-on-check-fail:
required: false
type: boolean
default: false
env:
CARGO_TERM_COLOR: always
jobs:
format-check:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install resymgen
uses: ./.github/actions/build-resymgen
- name: Format check
run: resymgen fmt --recursive --check symbols/*.yml
format:
runs-on: ubuntu-latest
needs: format-check
if: failure() && !inputs.no-format-on-check-fail
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install resymgen
uses: ./.github/actions/build-resymgen
- name: Format
run: resymgen fmt --recursive symbols/*.yml
- name: Package reformatted files
run: zip resymgen-fmt-output.zip $(git diff --relative --name-only)
working-directory: symbols
- name: Upload reformatted files
uses: actions/upload-artifact@v4
with:
name: formatted-symbols
path: symbols/resymgen-fmt-output.zip
retention-days: 1
- name: Provide download link
run: |
echo 'Download link: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}#artifacts'
echo "You can download these properly formatted symbol files if you don't have the formatter (the Rust toolchain) set up in your environment."
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install resymgen
uses: ./.github/actions/build-resymgen
- name: Test
run: resymgen check --recursive --complete-version-list --explicit-versions --in-bounds-symbols --no-overlap --nonempty-maps --unique-symbols --data-names SCREAMING_SNAKE_CASE --function-names Pascal_Snake_Case --function-names snake_case symbols/*.yml