-
Notifications
You must be signed in to change notification settings - Fork 31
45 lines (40 loc) · 1.4 KB
/
python_unit_tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
# Reference environment variables: https://docs.github.com/en/actions/reference/environment-variables
name: OpenC3 Python Unit Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
unit-test:
if: ${{ github.actor != 'dependabot[bot]' }}
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements-dev.txt
working-directory: openc3/python
- name: Lint with ruff
run: |
ruff --format=github openc3
working-directory: openc3/python
- name: Run unit tests
run: |
python -m unittest
working-directory: openc3/python