Merge pull request #5 from parithosh/update-cache
Add cache to linter and codespell
This commit is contained in:
commit
85cf5ebba0
|
@ -30,7 +30,7 @@ on:
|
||||||
- cron: '0 0 * * *'
|
- cron: '0 0 * * *'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
precleanup:
|
preclear:
|
||||||
runs-on: self-hosted
|
runs-on: self-hosted
|
||||||
if: always()
|
if: always()
|
||||||
steps:
|
steps:
|
||||||
|
@ -40,43 +40,37 @@ jobs:
|
||||||
rm -rf ./* || true
|
rm -rf ./* || true
|
||||||
rm -rf ./.??* || true
|
rm -rf ./.??* || true
|
||||||
ls -la ./
|
ls -la ./
|
||||||
setup-env:
|
|
||||||
runs-on: self-hosted
|
table_of_contents:
|
||||||
needs: precleanup
|
runs-on: self-hosted
|
||||||
steps:
|
needs: preclear
|
||||||
|
steps:
|
||||||
- name: Checkout this repo
|
- name: Checkout this repo
|
||||||
uses: actions/checkout@v3.2.0
|
uses: actions/checkout@v3.2.0
|
||||||
with:
|
with:
|
||||||
ref: ${{ github.event.inputs.commitRef || env.DEFAULT_BRANCH }}
|
ref: ${{ github.event.inputs.commitRef || env.DEFAULT_BRANCH }}
|
||||||
- uses: actions/cache@v3.2.2
|
|
||||||
id: cache-git
|
|
||||||
with:
|
|
||||||
path: ./*
|
|
||||||
key: ${{ github.sha }}
|
|
||||||
|
|
||||||
table_of_contents:
|
|
||||||
runs-on: self-hosted
|
|
||||||
needs: setup-env
|
|
||||||
steps:
|
|
||||||
- uses: actions/cache@v3.2.2
|
|
||||||
id: restore-build
|
|
||||||
with:
|
|
||||||
path: ./*
|
|
||||||
key: ${{ github.sha }}
|
|
||||||
- name: Check table of contents
|
- name: Check table of contents
|
||||||
run: sudo npm install -g doctoc@2 && make check_toc
|
run: sudo npm install -g doctoc@2 && make check_toc
|
||||||
|
|
||||||
codespell:
|
codespell:
|
||||||
runs-on: self-hosted
|
runs-on: self-hosted
|
||||||
needs: setup-env
|
needs: preclear
|
||||||
steps:
|
steps:
|
||||||
|
- name: Checkout this repo
|
||||||
|
uses: actions/checkout@v3.2.0
|
||||||
|
with:
|
||||||
|
ref: ${{ github.event.inputs.commitRef || env.DEFAULT_BRANCH }}
|
||||||
- name: Check codespell
|
- name: Check codespell
|
||||||
run: pip install 'codespell<3.0.0,>=2.0.0' --user && make codespell
|
run: pip install 'codespell<3.0.0,>=2.0.0' --user && make codespell
|
||||||
|
|
||||||
lint:
|
lint:
|
||||||
runs-on: self-hosted
|
runs-on: self-hosted
|
||||||
needs: setup-env
|
needs: preclear
|
||||||
steps:
|
steps:
|
||||||
|
- name: Checkout this repo
|
||||||
|
uses: actions/checkout@v3.2.0
|
||||||
|
with:
|
||||||
|
ref: ${{ github.event.inputs.commitRef || env.DEFAULT_BRANCH }}
|
||||||
- name: Run linter for pyspec
|
- name: Run linter for pyspec
|
||||||
run: make lint
|
run: make lint
|
||||||
- name: Run linter for test generators
|
- name: Run linter for test generators
|
||||||
|
@ -84,16 +78,15 @@ jobs:
|
||||||
|
|
||||||
pyspec-tests:
|
pyspec-tests:
|
||||||
runs-on: self-hosted
|
runs-on: self-hosted
|
||||||
needs: [setup-env,lint,codespell,table_of_contents]
|
needs: [preclear,lint,codespell,table_of_contents]
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
version: ["phase0", "altair", "bellatrix", "capella", "eip4844"]
|
version: ["phase0", "altair", "bellatrix", "capella", "eip4844"]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/cache@v3.2.2
|
- name: Checkout this repo
|
||||||
id: restore-build
|
uses: actions/checkout@v3.2.0
|
||||||
with:
|
with:
|
||||||
path: ./*
|
ref: ${{ github.event.inputs.commitRef || env.DEFAULT_BRANCH }}
|
||||||
key: ${{ github.sha }}
|
|
||||||
- name: set TEST_PRESET_TYPE
|
- name: set TEST_PRESET_TYPE
|
||||||
if: github.event.inputs.test_preset_type != ''
|
if: github.event.inputs.test_preset_type != ''
|
||||||
run: |
|
run: |
|
||||||
|
@ -122,7 +115,7 @@ jobs:
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
runs-on: self-hosted
|
runs-on: self-hosted
|
||||||
needs: [setup-env,pyspec-tests,codespell,lint,table_of_contents]
|
needs: [preclear,pyspec-tests,codespell,lint,table_of_contents]
|
||||||
if: always()
|
if: always()
|
||||||
steps:
|
steps:
|
||||||
- name: 'Cleanup build folder'
|
- name: 'Cleanup build folder'
|
||||||
|
|
Loading…
Reference in New Issue