From 4813a348e835b2fe83c014c3ad5c4432144aa743 Mon Sep 17 00:00:00 2001 From: sam Date: Thu, 22 Feb 2024 18:23:02 +0000 Subject: [PATCH] Fixed flake dependency, added windows and mac tests --- .github/workflows/lint.yml | 5 +++++ .github/workflows/test_mac.yml | 34 ++++++++++++++++++++++++++++++ .github/workflows/test_windows.yml | 34 ++++++++++++++++++++++++++++++ 3 files changed, 73 insertions(+) create mode 100644 .github/workflows/test_mac.yml create mode 100644 .github/workflows/test_windows.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 9a735a7..d19dd15 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -20,6 +20,11 @@ jobs: with: python-version: 3.9 + - name: Install flake + run: | + python -m pip install --upgrade pip + pip install flake8 + - name: Flake 8 Syntax Errors run: | flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics diff --git a/.github/workflows/test_mac.yml b/.github/workflows/test_mac.yml new file mode 100644 index 0000000..3ff6392 --- /dev/null +++ b/.github/workflows/test_mac.yml @@ -0,0 +1,34 @@ +name: MacOS + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +permissions: + contents: read + +jobs: + build: + runs-on: macos-latest + strategy: + matrix: + python-version: ["3.9", "3.10", "3.11", "3.12"] + + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install flake8 pytest + pip install -r requirements.txt + + - name: Pytest + run: | + pytest . \ No newline at end of file diff --git a/.github/workflows/test_windows.yml b/.github/workflows/test_windows.yml new file mode 100644 index 0000000..b66ac7a --- /dev/null +++ b/.github/workflows/test_windows.yml @@ -0,0 +1,34 @@ +name: Windows + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +permissions: + contents: read + +jobs: + build: + runs-on: windows-latest + strategy: + matrix: + python-version: ["3.9", "3.10", "3.11", "3.12"] + + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install flake8 pytest + pip install -r requirements.txt + + - name: Pytest + run: | + pytest . \ No newline at end of file