Skip to content

Commit

Permalink
Create Python workflow for GitHub Actions (#1)
Browse files Browse the repository at this point in the history
* Create Python workflow for GitHub Actions

In case we receive PRs via GitHub, it would be good if we have a basic setup for running lints and tests, even if we cannot execute the full pipeline. We might migrate our pipeline here in the future.

* Update Poetry lock
  • Loading branch information
slahtine authored Aug 27, 2024
1 parent 4e0c915 commit 70924f3
Show file tree
Hide file tree
Showing 2 changed files with 229 additions and 174 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

name: NaC Python SDK

on:
push

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up Python 3.9
uses: actions/setup-python@v3
with:
python-version: "3.9"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
poetry install
- name: Lint with pylint
run: |
poetry run pylint network_as_code
- name: Test with pytest
run: |
poetry run pytest
Loading

0 comments on commit 70924f3

Please sign in to comment.