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

Attempt to run on an image #11

Merged
merged 14 commits into from
Jul 2, 2024
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
3 changes: 2 additions & 1 deletion pyrightconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"venvPath": ".",
"venv": ".venv",
"reportAttributeAccessIssue": false
"reportAttributeAccessIssue": false,
"reportMissingImports": false
}