Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add autoformatting to CI (for Markdown, YAML, JSON) #95

Merged
merged 18 commits into from
Oct 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Code autoformatting

on:
push:
branches:
- main

jobs:
format:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3
with:
# Make sure the actual branch is checked out when running on pull requests
ref: ${{ github.head_ref }}
# This is important to fetch the changes to the previous commit
fetch-depth: 0

- name: Run Prettier
uses: creyD/[email protected]
with:
prettier_options: --write **/*.{md,json,yaml,yml}
# Update the current commit instead of creating a new one. Only works if checkout fetch depth is set to `0`
same_commit: true
# Prettify changed files. Only works if checkout fetch depth is set to `0`
only_changed: true
9 changes: 6 additions & 3 deletions .github/workflows/rzk.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
name: Check with latest Rzk
name: Typecheck with latest Rzk

# Controls when the workflow will run
on:
# Triggers the workflow on push events
push:
branches:
- main
# and pull request events
pull_request:
branches:
- main

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Expand All @@ -17,9 +21,8 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Check all files
- name: Typecheck Rzk files
uses: rzk-lang/rzk-action@v1
with:
rzk-version: latest
# rzk-version: v0.4.1.1 # example of a specific version
files: src/hott/* src/simplicial-hott/*
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Simplicial HoTT and synthetic ∞-categories

[![Check with latest Rzk](https://github.com/rzk-lang/sHoTT/actions/workflows/rzk.yml/badge.svg)](https://github.com/rzk-lang/sHoTT/actions/workflows/rzk.yml)
[![Typecheck with latest Rzk](https://github.com/rzk-lang/sHoTT/actions/workflows/rzk.yml/badge.svg)](https://github.com/rzk-lang/sHoTT/actions/workflows/rzk.yml)
[![MkDocs to GitHub Pages](https://github.com/rzk-lang/sHoTT/actions/workflows/mkdocs.yml/badge.svg)](https://github.com/rzk-lang/sHoTT/actions/workflows/mkdocs.yml)

> :information_source: This project originated as a fork of
Expand Down