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

ci(Test): Simplify via pre-commit-action #15

Merged
merged 1 commit into from
Apr 26, 2022
Merged
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
ci(Test): Simplify via pre-commit-action
Many steps of the Test workflow have been consolidated into
pre-commit-action to reduce duplication across repositories.
  • Loading branch information
Kurt-von-Laven committed Apr 26, 2022
commit 60fe0b356b2ea7bb2182a96e6c6ff7e2b3bd79cb
42 changes: 4 additions & 38 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,41 +9,7 @@ on:
jobs:
test:
name: Run Pre-commit Hooks
runs-on: ubuntu-20.04
steps:
- name: Check out repository.
uses: actions/checkout@v3.0.2
with:
fetch-depth: 0
- name: Install asdf-managed tools based on .tool-versions.
uses: asdf-vm/actions/install@v1.1.0
with:
asdf_branch: v0.10.0
- name: Add Poetry and its dependencies to PATH.
run: |
for version in ~/.asdf/installs/poetry/*; do
echo "$version/bin" >> "$GITHUB_PATH"
done
echo "${{ github.workspace }}"/.venv/bin >> "$GITHUB_PATH"
- name: Cache Poetry dependencies.
uses: actions/cache@v3.0.2
with:
path: .venv
key: poetry-${{ runner.os }}-${{ hashFiles('poetry.lock') }}
- name: Install Poetry dependencies.
run: poetry install
- name: Use Docker in rootless mode.
uses: ScribeMD/rootless-docker@0.1.1
- name: Run pre-push hooks.
uses: pre-commit/action@v2.0.3
env:
SKIP: no-commit-to-branch
with:
extra_args: "--all-files --hook-stage push"
- name: Send Slack notification with job status.
if: always()
uses: ScribeMD/slack-templates@0.2.3
with:
bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
channel-id: ${{ secrets.SLACK_ACTIONS_CHANNEL_ID }}
template: result
uses: ScribeMD/pre-commit-action/.github/workflows/test.yaml@0.1.5
secrets:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
SLACK_ACTIONS_CHANNEL_ID: ${{ secrets.SLACK_ACTIONS_CHANNEL_ID }}