Skip to content

Commit

Permalink
Created basic CI framework (#326)
Browse files Browse the repository at this point in the history
  • Loading branch information
milesturin authored May 4, 2022
1 parent bfa718d commit 26383dd
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: unittests

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: "3.8"

- name: Cache pip dependencies
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ hashFiles('setup.py') }}-pytest-pip

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .
pip install -U pytest
- name: Run unit tests
run: pytest skylark/test/unit_nocloud
#- name: Run cloud tests
###consider only running cloud tests for PRs to main once we go open source
###if: ${{ github.event_name == 'pull_request' && github.base_ref == github.event.repository.default_branch }}
#run: |
#pytest skylark/test/unit_aws
#pytest skylark/test/unit_azure
#pytest skylark/test/unit_gcp
Empty file added skylark/test/unit_aws/.gitkeep
Empty file.
Empty file.
Empty file added skylark/test/unit_gcp/.gitkeep
Empty file.
5 changes: 5 additions & 0 deletions skylark/test/unit_nocloud/test_nop.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
def nop():
return True

def test_nop():
assert nop()

0 comments on commit 26383dd

Please sign in to comment.