diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index ac50674..880fa0b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -9,24 +9,16 @@ on: - master jobs: - formatting: + pre-commit: name: Formatting runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - uses: actions/setup-python@v1 - with: - python-version: '3.7' - architecture: 'x64' - - - name: Install pre-commit - run: python -m pip install pre-commit - - - name: Run pre-commit - run: pre-commit run --all - - - name: Display format changes - run: git diff --exit-code - if: always() - + - uses: actions/checkout@v1 + - uses: actions/setup-python@v1 + - name: set PY + run: echo "::set-env name=PY::$(python --version --version | sha256sum | cut -d' ' -f1)" + - uses: actions/cache@v1 + with: + path: ~/.cache/pre-commit + key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }} + - uses: pre-commit/action@v1.0.0 diff --git a/README.md b/README.md index fa1efb5..dfb9066 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,7 @@ [![Build Status Linux and macOS][travis-badge]][travis] [![Build Status Windows][appveyor-badge]][appveyor] [![Build Status Azure][azure-badge]][azure] +[![Actions Status][actions-badge]][actions-link] [![Code Coverage][codecov-badge]][codecov] [![Codacy Badge][codacy-badge]][codacy-link] [![Join the chat at https://gitter.im/CLI11gitter/Lobby][gitter-badge]][gitter] @@ -870,6 +871,8 @@ CLI11 was developed at the [University of Cincinnati][] to support of the [GooFi [travis]: https://travis-ci.org/CLIUtils/CLI11 [appveyor-badge]: https://img.shields.io/appveyor/ci/HenrySchreiner/cli11/master.svg?label=Windows [appveyor]: https://ci.appveyor.com/project/HenrySchreiner/cli11 +[actions-badge]: https://github.com/CLIUtils/CLI11/workflows/Tests/badge.svg +[actions-link]: https://github.com/CLIUtils/CLI11/actions [codecov-badge]: https://codecov.io/gh/CLIUtils/CLI11/branch/master/graph/badge.svg [codecov]: https://codecov.io/gh/CLIUtils/CLI11 [gitter-badge]: https://badges.gitter.im/CLI11gitter/Lobby.svg