From 19b4b1683b9a50fda4a5cbcf308dd3189159d9ce Mon Sep 17 00:00:00 2001 From: John Vouvakis Manousakis Date: Fri, 21 Jun 2024 18:04:51 -0700 Subject: [PATCH] Test. --- .github/workflows/deploy_to_pypi.yaml | 32 -------------------------- .github/workflows/format_and_lint.yaml | 24 +------------------ .github/workflows/tests.yaml | 30 ------------------------ 3 files changed, 1 insertion(+), 85 deletions(-) delete mode 100644 .github/workflows/deploy_to_pypi.yaml delete mode 100644 .github/workflows/tests.yaml diff --git a/.github/workflows/deploy_to_pypi.yaml b/.github/workflows/deploy_to_pypi.yaml deleted file mode 100644 index ff5577e4a..000000000 --- a/.github/workflows/deploy_to_pypi.yaml +++ /dev/null @@ -1,32 +0,0 @@ -name: Deploy to PyPI - -on: - release: - types: [created] - -jobs: - deploy: - runs-on: ubuntu-latest - steps: - - name: Check out code - uses: actions/checkout@v3 - - - name: Set up Python - uses: actions/setup-python@v3 - with: - python-version: '3.10' - - - name: Install dependencies - run: | - python -m pip install --upgrade pip - python -m pip install setuptools wheel twine - - - name: Build package - run: | - python setup.py sdist bdist_wheel - - - name: Publish package to PyPI - uses: pypa/gh-action-pypi-publish@release/v1 - with: - user: zsarnoczay - password: ${{ secrets.PELICUN_GITHUB_TOKEN }} diff --git a/.github/workflows/format_and_lint.yaml b/.github/workflows/format_and_lint.yaml index d7a56036a..f2d53dca4 100644 --- a/.github/workflows/format_and_lint.yaml +++ b/.github/workflows/format_and_lint.yaml @@ -23,26 +23,4 @@ jobs: pip install black flake8 - name: Run Black - run: black -S . - - - name: Check for changes after Black - id: git_status - run: | - git config --global user.name 'github-actions[bot]' - git config --global user.email '41898282+github-actions[bot]@users.noreply.github.com' - git status - if [[ `git status --porcelain` ]]; then - git add . - git commit -m "Format code with Black" - else - echo "No changes to commit" - fi - - - name: Push changes - if: success() && steps.git_status.outputs.commit_message != '' - uses: ad-m/github-push-action@v0.6.0 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - - - name: Run Flake8 - run: flake8 . + run: black -S --diff . diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml deleted file mode 100644 index 25bd3f43a..000000000 --- a/.github/workflows/tests.yaml +++ /dev/null @@ -1,30 +0,0 @@ -name: Tests - -on: - - push - - pull_request - -jobs: - test: - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-latest, windows-latest, macos-latest] - python-version: ['3.8', '3.9', '3.10'] - steps: - - uses: actions/checkout@v2 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version}} - - name: Install dependencies - run: | - python -m pip install --upgrade pip - python -m pip install -e .[development] - - name: Run tests - run: | - python -m pytest --cov=pelicun --cov-report xml pelicun/tests - - name: Upload coverage reports to Codecov - uses: codecov/codecov-action@v3 - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}