Skip to content

Commit

Permalink
Run CI with stormpy
Browse files Browse the repository at this point in the history
  • Loading branch information
linusheck authored Jul 2, 2024
1 parent 9f47875 commit 014b708
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 23 deletions.
27 changes: 15 additions & 12 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Lint

on: [push, pull_request]
on: [push]

concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
Expand All @@ -13,9 +13,17 @@ env:
jobs:
pre-commit:
runs-on: ubuntu-22.04
container:
image: movesrwth/stormpy:ci-debug
steps:
- uses: actions/checkout@v4

- name: Install dependencies
run: |
apt-get update
apt-get -y install curl
apt-get -y install git
- name: Configure Python
uses: actions/setup-python@v5
with:
Expand All @@ -28,19 +36,14 @@ jobs:
virtualenvs-create: true
virtualenvs-in-project: true

- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v4
with:
path: .venv
key: venv-${{ runner.os }}-v1-${{ hashFiles('**/poetry.lock') }}
- name: Load existing venv
run: poetry env use /opt/venv/bin/python

- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-root --only main,test
run: poetry install

- name: Install pre-commit
run: pip install pre-commit==${{ env.PRECOMMIT_VERSION }}
- name: Git thinks the directories are sus
run: git config --global --add safe.directory '*'

- name: Cache pre-commit
uses: actions/cache@v4
Expand All @@ -49,4 +52,4 @@ jobs:
key: precommit-${{ hashFiles('.pre-commit-config.yaml') }}

- name: Run pre-commit
run: pre-commit run --all-files
run: poetry run pre-commit run --all-files
25 changes: 14 additions & 11 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Test

on: [push, pull_request]
on: [push]

concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
Expand All @@ -13,9 +13,17 @@ env:
jobs:
test:
runs-on: ubuntu-22.04
container:
image: movesrwth/stormpy:ci-debug
steps:
- uses: actions/checkout@v4

- name: Install dependencies
run: |
apt-get update
apt-get -y install curl
apt-get -y install git
- name: Configure Python
uses: actions/setup-python@v5
with:
Expand All @@ -28,16 +36,11 @@ jobs:
virtualenvs-create: true
virtualenvs-in-project: true

- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v4
with:
path: .venv
key: venv-${{ runner.os }}-v1-${{ hashFiles('**/poetry.lock') }}
- name: Load existing venv
run: poetry env use /opt/venv/bin/python

- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-root --only main,test
run: poetry install

- name: Install library
run: poetry install --only main,test
- name: Run tests
run: poetry run pytest

0 comments on commit 014b708

Please sign in to comment.