diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index f4475b0b..e7bb8024 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -1,31 +1,35 @@ +# This workflow will install Python dependencies, run tests and lint with a variety of Python versions +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions + name: build & test -on: [pull_request, push, workflow_dispatch] +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] jobs: - test: - runs-on: ${{ matrix.os }} + build: + + runs-on: ubuntu-latest strategy: - fail-fast: true + fail-fast: false matrix: - os: ["ubuntu-latest", "windows-latest", "macos-latest"] - python-version: ["3.8", "3.9", "3.10", "3.11"] + python-version: ['3.8', '3.9', '3.10', '3.11'] steps: - - name: Checkout source - uses: actions/checkout@v2 - - - name: Setup python - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} - architecture: x64 - - - name: Install - run: | - python -m pip install --upgrade pip - python -m pip install pytest - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - - - name: Run tests - run: pytest \ No newline at end of file + - 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 + python -m pip install flake8 pytest + python -m pip install scipy + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + - name: Test with unittest + run: | + python -m unittest Testing \ No newline at end of file