Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
Yiannis128 committed Nov 7, 2024
1 parent de6d01e commit f557ab3
Showing 1 changed file with 56 additions and 18 deletions.
74 changes: 56 additions & 18 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ jobs:
name: requirements
path: requirements.txt

build:
name: Build
pylint:
name: PyLint
runs-on: ubuntu-latest
needs: setup-requirements
timeout-minutes: 10
Expand All @@ -69,17 +69,42 @@ jobs:
~/.local/share/hatch
key: ${{ runner.os }}-hatch-${{ env.HATCH_DEP_HASH }}

- name: Hatch build
run: hatch build

- name: Upload build files
uses: actions/[email protected]
- name: Pylint on esbmc_ai
run: hatch run pylint esbmc_ai

test:
name: PyTest
needs: setup-requirements
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- name: Check out repository code
uses: actions/[email protected]

# Setup Python (faster than using Python container)
- name: Setup Python
uses: actions/[email protected]
with:
name: build
path: dist
python-version: "3.12.0"

pylint:
name: PyLint
- name: Install Hatch
if: steps.cache-hatch.outputs.cache-hit != 'true'
run: python -m pip install --upgrade hatch

- name: Cache Hatch environment
uses: actions/[email protected]
with:
path: |
~/.cache/hatch
~/.local/share/hatch
key: ${{ runner.os }}-hatch-${{ env.HATCH_DEP_HASH }}

- name: Run test suite
run: hatch run pytest

incremenet_version:
name: Increment Version
runs-on: ubuntu-latest
needs: setup-requirements
timeout-minutes: 10
Expand All @@ -105,14 +130,21 @@ jobs:
~/.cache/hatch
~/.local/share/hatch
key: ${{ runner.os }}-hatch-${{ env.HATCH_DEP_HASH }}

- name: Invrement Version
run: hatch version dev

- name: Pylint on esbmc_ai
run: hatch run pylint esbmc_ai
- name: GitHub Push
if: github.ref != 'refs/heads/master'
uses: ad-m/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}

test:
name: PyTest
needs: setup-requirements
build:
name: Build
runs-on: ubuntu-latest
needs: setup-requirements
timeout-minutes: 10

steps:
Expand All @@ -137,5 +169,11 @@ jobs:
~/.local/share/hatch
key: ${{ runner.os }}-hatch-${{ env.HATCH_DEP_HASH }}

- name: Run test suite
run: hatch run pytest
- name: Hatch build
run: hatch build

- name: Upload build files
uses: actions/[email protected]
with:
name: build
path: dist

0 comments on commit f557ab3

Please sign in to comment.