Skip to content

Commit

Permalink
Merge pull request #115 from kmyk/format-everything
Browse files Browse the repository at this point in the history
Update formatters
  • Loading branch information
kmyk authored Jul 30, 2021
2 parents 1b44fcc + 7eaf441 commit 89116ac
Show file tree
Hide file tree
Showing 28 changed files with 885 additions and 797 deletions.
15 changes: 6 additions & 9 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,32 @@
---
name: Bug report / バグ報告
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

title: ""
labels: ""
assignees: ""
---

## Summary / 概要


## Steps to reproduce / 再現方法

1. xxx
1. yyy
1. zzz

``` python
```python
# Pelase include your Python code that you used
```

environments:

- version: (please write the versions of related things, e.g. `$ stack run --version`)
- version: (please write the versions of related things, e.g. `$ stack run --version`)

## Expected behavior / 期待される挙動


## Actual behavior / 実際の挙動

``` console
```console
$ echo Please paste the log here
Please paste the log here
```
8 changes: 3 additions & 5 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
---
name: Feature request / 機能要望
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

title: ""
labels: ""
assignees: ""
---

## Description / 説明


## Motivation / 動機
48 changes: 24 additions & 24 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,27 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Set up Haskell
uses: haskell/actions/setup@v1
with:
enable-stack: true

- uses: actions/cache@v2
with:
path: ~/.stack
key: ${{ runner.os }}-stack-${{ hashFiles('stack.yaml') }}

- name: Build dependencies
run: stack --system-ghc build --only-dependencies

- name: Run Haddock
run: stack --system-ghc haddock --haddock-arguments --odir=public

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
- uses: actions/checkout@v2

- name: Set up Haskell
uses: haskell/actions/setup@v1
with:
enable-stack: true

- uses: actions/cache@v2
with:
path: ~/.stack
key: ${{ runner.os }}-stack-${{ hashFiles('stack.yaml') }}

- name: Build dependencies
run: stack --system-ghc build --only-dependencies

- name: Run Haddock
run: stack --system-ghc haddock --haddock-arguments --odir=public

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
8 changes: 4 additions & 4 deletions .github/workflows/format-cplusplus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v2

- name: Run clang-format
run: |
set -ex; for f in $(find runtime/include examples/data -name \*.\?pp); do diff $f <(clang-format $f); done
- name: Run clang-format
run: |
set -ex; for f in $(find runtime/include examples/data -name \*.\?pp); do diff $f <(clang-format $f); done
18 changes: 18 additions & 0 deletions .github/workflows/format-markdown.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: format-markdown

on: [push, pull_request]

jobs:
format-markdown:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Install Dependencies
run: yarn install

- name: Run Prettier
run: |
yarn prettier --check $(git ls-files | grep '\.md$')
shell: bash
28 changes: 14 additions & 14 deletions .github/workflows/format-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,22 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8

- name: Install dependencies
run: pip3 install -r scripts/requirements.txt
- name: Install dependencies
run: pip3 install -r scripts/requirements.txt

- name: Run isort
run: isort --check-only --diff scripts/*.py examples/data/*.py
- name: Run isort
run: isort --check-only --diff scripts/*.py examples/data/*.py

- name: Run yapf
run: |
yapf --diff '--style={ COLUMN_LIMIT: 9999 }' scripts/*.py examples/data/*.py
- name: Run yapf
run: |
yapf --diff '--style={ COLUMN_LIMIT: 9999 }' scripts/*.py examples/data/*.py
- name: Run mypy
run: mypy scripts/*.py examples/data/*.py
- name: Run mypy
run: mypy scripts/*.py examples/data/*.py
18 changes: 18 additions & 0 deletions .github/workflows/format-yaml.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: format-yaml

on: [push, pull_request]

jobs:
format-yaml:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Install Dependencies
run: yarn install

- name: Run Prettier
run: |
yarn prettier --check $(git ls-files | grep '\.yml$\|\.yaml$\|\.json$')
shell: bash
35 changes: 20 additions & 15 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,28 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v2

- name: Set up Haskell
uses: haskell/actions/setup@v1
with:
enable-stack: true
- name: Set up Haskell
uses: haskell/actions/setup@v1
with:
enable-stack: true

- uses: actions/cache@v2
with:
path: ~/.stack
key: ${{ runner.os }}-stack-test-${{ hashFiles('stack.yaml') }}
- uses: actions/cache@v2
with:
path: ~/.stack
key: ${{ runner.os }}-stack-test-${{ hashFiles('stack.yaml') }}

- name: Build dependencies
run: stack --system-ghc build --test --only-dependencies
- name: Build dependencies
run: stack --system-ghc build --test --only-dependencies

- name: Run Ormolu
run: stack --system-ghc exec ormolu -- --mode=check $(find src app test -name \*.hs)
- name: Run Ormolu
run: stack --system-ghc exec ormolu -- --mode=check $(find src app test -name \*.hs)

- name: Run HLint
run: stack --system-ghc exec hlint -- src app test
- name: Run HLint
run: stack --system-ghc exec hlint -- src app test

- name: Check .cabal is up-to-date
run: |
stack --system-ghc build --only-configure
git diff --exit-code *.cabal
48 changes: 24 additions & 24 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,38 +6,38 @@ jobs:
test:
strategy:
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
os: [ubuntu-latest, macos-latest, windows-latest]

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v2
with:
submodules: true
- uses: actions/checkout@v2
with:
submodules: true

- name: Set up Haskell
uses: haskell/actions/setup@v1
with:
enable-stack: true
- name: Set up Haskell
uses: haskell/actions/setup@v1
with:
enable-stack: true

- uses: actions/cache@v2
with:
path: |
~/.stack
${{ env.STACK_ROOT }}
key: ${{ runner.os }}-stack-test-${{ hashFiles('stack.yaml') }}
- uses: actions/cache@v2
with:
path: |
~/.stack
${{ env.STACK_ROOT }}
key: ${{ runner.os }}-stack-test-${{ hashFiles('stack.yaml') }}

- name: Build dependencies
run: stack --system-ghc build --test --only-dependencies
- name: Build dependencies
run: stack --system-ghc build --test --only-dependencies

- name: Build
run: stack --system-ghc build --ghc-options=-Werror
- name: Build
run: stack --system-ghc build --ghc-options=-Werror

- name: Run unit tests
run: stack --system-ghc test --ghc-options=-Werror Jikka:jikka-test
- name: Run unit tests
run: stack --system-ghc test --ghc-options=-Werror Jikka:jikka-test

- name: Run doctests
run: stack --system-ghc test --ghc-options=-Werror Jikka:jikka-doctest
- name: Run doctests
run: stack --system-ghc test --ghc-options=-Werror Jikka:jikka-doctest

- name: Run integration tests
run: python3 scripts/integration_tests.py
- name: Run integration tests
run: python3 scripts/integration_tests.py
Loading

0 comments on commit 89116ac

Please sign in to comment.