Skip to content

Commit

Permalink
build: move steps to template dir
Browse files Browse the repository at this point in the history
  • Loading branch information
JasperHG90 committed Jan 5, 2024
1 parent c7baec4 commit 9e89d3d
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 24 deletions.
27 changes: 3 additions & 24 deletions .github/workflows/pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,30 +12,9 @@ permissions:

jobs:
checks:
name: 'Checks'
name: 'checks'
#if: ${{ github.event_name == 'pull_request'}}
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'pip'
- uses: extractions/setup-just@v1
name: Setup just
- name: Initialize Pants
uses: pantsbuild/actions/init-pants@main
with:
# cache0 makes it easy to bust the cache if needed
gha-cache-key: cache0-py310
named-caches-hash: ${{ hashFiles('lockfiles/*.json', '**/something-else.lock') }}
- name: format
run: just fmt
- name: lint
run: just lint
- name: test
run: just test
- name: package
run: just package
- name: 'checks'
uses: ./.github/workflows/templates/checks
27 changes: 27 additions & 0 deletions .github/workflows/templates/checks/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: checks

runs:
using: "composite"
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'pip'
- uses: extractions/setup-just@v1
name: Setup just
- name: Initialize Pants
uses: pantsbuild/actions/init-pants@main
with:
# cache0 makes it easy to bust the cache if needed
gha-cache-key: cache0-py310
named-caches-hash: ${{ hashFiles('lockfiles/*.json', '**/something-else.lock') }}
- name: format
run: just fmt
- name: lint
run: just lint
- name: test
run: just test
- name: package
run: just package

0 comments on commit 9e89d3d

Please sign in to comment.