cleanup(generator): simplify codec initialization #341
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright 2024 Google LLC | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# https://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, | |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
# See the License for the specific language governing permissions and | |
# limitations under the License. | |
name: Lint | |
on: [push, pull_request] | |
jobs: | |
spell: | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cargo | |
key: ${{ github.job }}-${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock', '.github/workflows/lint.yaml') }} | |
- run: | | |
rustup component list | |
cargo install typos-cli --version 1.26.8 | |
- run: typos | |
misc-formatting: | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Go 1.23 | |
uses: actions/setup-go@v5 | |
with: | |
go-version: 1.23 | |
- uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cargo | |
key: ${{ github.job }}-${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock', '.github/workflows/lint.yaml') }} | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.13' | |
cache: 'pip' | |
cache-dependency-path: 'ci/requirements.txt' | |
- name: Verify Copyright Boilerplate | |
run: | | |
cargo build --release --bin check-copyright | |
git ls-files -z -- '*.yaml' '*.yml' '*.toml' '*.go' '*.rs' ':!:**/testdata/**' ':!:**.md' ':!:**.mustache' | \ | |
xargs -0 -r -P "$(nproc)" -n 50 cargo run --release --bin check-copyright | |
- name: Format Markdown Files | |
run: | | |
pip install -r ci/requirements.txt | |
git ls-files -z -- '*.md' ':!:**/testdata/**' | \ | |
xargs -0 -r -P "$(nproc)" -n 50 mdformat | |
- name: Format YAML Files | |
run: | | |
go install github.com/google/yamlfmt/cmd/[email protected] | |
git ls-files -z -- '*.yaml' '*.yml' ':!:**/testdata/**' | \ | |
xargs -0 yamlfmt | |
- name: Format TOML files | |
run: | | |
cargo install taplo-cli --version 0.9.3 | |
git ls-files -z -- '*.toml' ':!:**/testdata/**' | \ | |
xargs -0 taplo fmt | |
- name: Check for changes | |
run: git diff --exit-code |