Skip to content

Commit

Permalink
Lava v0.4.0 (#265)
Browse files Browse the repository at this point in the history
* Lava 0.4.0

Signed-off-by: Marcus G K Williams <Marcus G K Williams [email protected]>

Co-authored-by: Joyesh Mishra <[email protected]>
Co-authored-by: Yashwardhan Singh <[email protected]>
Co-authored-by: GaboFGuerra <[email protected]>
Co-authored-by: Mathis Richter <[email protected]>
Co-authored-by: PhilippPlank <[email protected]>
Co-authored-by: bamsumit <[email protected]>
Co-authored-by: Danielle Rager <[email protected]>
Co-authored-by: Risbud, Sumedh <[email protected]>
Co-authored-by: Philipp Stratmann <[email protected]>
Co-authored-by: weidel-p <[email protected]>
Co-authored-by: Andreas Wild <[email protected]>
Co-authored-by: Marcus G K Williams <Marcus G K Williams [email protected]>
  • Loading branch information
13 people authored Jul 13, 2022
1 parent fb35fbf commit 19132bb
Show file tree
Hide file tree
Showing 148 changed files with 10,729 additions and 5,842 deletions.
289 changes: 146 additions & 143 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
@@ -1,143 +1,146 @@
name: Run CI
on: [push, pull_request]

jobs:
lint:
name: Lint Code
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
with:
lfs: true

- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9

- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true

- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v2
with:
path: ~/.cache
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-01-${{ hashFiles('**/poetry.lock') }}

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

- name: Install Lava
run: poetry install --no-interaction

- name: Run flakeheaven (flake8)
if: runner.os == 'Linux' || runner.os == 'macOS'
run: |
source $VENV
flakeheaven lint src/lava tests/
- name: Run flakeheaven (flake8)
if: runner.os == 'Windows'
run: |
.venv\Scripts\activate.ps1
flakeheaven lint src/lava tests/
security-lint:
name: Security Lint Code
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
with:
lfs: true

- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9

- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true

- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v2
with:
path: ~/.cache
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-01-${{ hashFiles('**/poetry.lock') }}

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

- name: Install Lava
run: poetry install --no-interaction

- name: Run bandit
uses: tj-actions/[email protected]
with:
targets: |
src/lava/.
options: "-r --format custom --msg-template '{abspath}:{line}: {test_id}[bandit]: {severity}: {msg}'"

unit-tests:
name: Unit Test Code + Coverage
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: [ubuntu-latest, windows-latest, macos-latest]

steps:
- uses: actions/checkout@v2
with:
lfs: true

- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9

- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true

- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v2
with:
path: ~/.cache
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-01-${{ hashFiles('**/poetry.lock') }}

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

- name: Install Lava
run: poetry install --no-interaction

- name: Run unit tests
if: runner.os == 'Linux' || runner.os == 'macOS'
run: |
git lfs fetch
git lfs pull
source $VENV
python3 -m pip install ipykernel
pytest
- name: Run unit tests
if: runner.os == 'Windows'
run: |
.venv\Scripts\activate.ps1
python3 -m pip install ipykernel
pytest
name: Run CI
on: [push, pull_request]

jobs:
lint:
name: Lint Code
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
with:
lfs: true

- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9

- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-path: .venv
virtualenvs-create: true
virtualenvs-in-project: true

- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v2
with:
path: ~/.cache
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-01-${{ hashFiles('**/poetry.lock') }}

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

- name: Install Lava
run: poetry install --no-interaction

- name: Run flakeheaven (flake8)
if: runner.os == 'Linux' || runner.os == 'macOS'
run: |
source $VENV
flakeheaven lint src/lava tests/
- name: Run flakeheaven (flake8)
if: runner.os == 'Windows'
run: |
.venv\Scripts\activate.ps1
flakeheaven lint src/lava tests/
security-lint:
name: Security Lint Code
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
with:
lfs: true

- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9

- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-path: .venv
virtualenvs-create: true
virtualenvs-in-project: true

- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v2
with:
path: ~/.cache
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-01-${{ hashFiles('**/poetry.lock') }}

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

- name: Install Lava
run: poetry install --no-interaction

- name: Run bandit
uses: tj-actions/[email protected]
with:
targets: |
src/lava/.
options: "-r --format custom --msg-template '{abspath}:{line}: {test_id}[bandit]: {severity}: {msg}'"

unit-tests:
name: Unit Test Code + Coverage
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: [ubuntu-latest, windows-latest, macos-latest]

steps:
- uses: actions/checkout@v2
with:
lfs: true

- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9

- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-path: .venv
virtualenvs-create: true
virtualenvs-in-project: true

- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v2
with:
path: ~/.cache
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-01-${{ hashFiles('**/poetry.lock') }}

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

- name: Install Lava
run: poetry install --no-interaction

- name: Run unit tests
if: runner.os == 'Linux' || runner.os == 'macOS'
run: |
git lfs fetch
git lfs pull
source $VENV
python3 -m pip install ipykernel
pytest
- name: Run unit tests
if: runner.os == 'Windows'
run: |
.venv\Scripts\activate.ps1
python3 -m pip install ipykernel
pytest
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ __pycache__/
*.py[cod]
*$py.class

# Lava PreDefs
predefs_*.h

# C extensions
*.so

Expand Down
Loading

0 comments on commit 19132bb

Please sign in to comment.