Skip to content

Commit

Permalink
Fix CI (#317)
Browse files Browse the repository at this point in the history
  • Loading branch information
klane authored Apr 21, 2024
1 parent 0416208 commit ea68c50
Show file tree
Hide file tree
Showing 11 changed files with 1,086 additions and 1,166 deletions.
8 changes: 4 additions & 4 deletions .github/actions/setup-torchts/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,23 @@ runs:
using: composite
steps:
- name: Set up Python ${{ inputs.python-version }}
uses: actions/setup-python@v2.2.2
uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python-version }}

- name: Get Python version
id: python-version
run: echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))")
run: echo version=$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))") >> $GITHUB_OUTPUT
shell: bash

- name: Install Poetry
uses: snok/install-poetry@v1.1.8
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true

- name: Restore Poetry cache
uses: actions/cache@v2.1.6
uses: actions/cache@v4
with:
path: .venv
key: poetry-${{ runner.os }}-${{ steps.python-version.outputs.version }}-${{ hashFiles('poetry.lock') }}
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,15 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2.4.0
uses: actions/checkout@v4

- name: Set up TorchTS
uses: ./.github/actions/setup-torchts
with:
python-version: 3.9

- name: Set up Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 14

Expand All @@ -49,14 +51,14 @@ jobs:
- name: Generate token
if: success() && github.event_name == 'push'
id: generate-token
uses: tibdex/github-app-token@v1.5
uses: tibdex/github-app-token@v2
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }}

- name: Deploy documentation
if: success() && github.event_name == 'push'
uses: JamesIves/github-pages-deploy-action@v4.2.5
uses: JamesIves/github-pages-deploy-action@v4
with:
token: ${{ steps.generate-token.outputs.token }}
git-config-name: torchts-bot[bot]
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ jobs:
steps:
- name: Generate token
id: generate-token
uses: tibdex/github-app-token@v1.5
uses: tibdex/github-app-token@v2
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }}

- name: Label pull request
uses: actions/labeler@v4
uses: actions/labeler@v5
with:
repo-token: ${{ steps.generate-token.outputs.token }}
30 changes: 17 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,26 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2.4.0
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: 3.9

- name: Install Poetry
uses: snok/install-poetry@v1.3
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true

- name: Install dependencies and build project
run: |
poetry install --no-dev
poetry install --without test,docs
poetry build
- name: Upload build artifacts
uses: actions/upload-artifact@v2.3.1
uses: actions/upload-artifact@v4
with:
name: poetry-build
path: dist/
Expand All @@ -42,10 +44,10 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2.4.0
uses: actions/checkout@v4

- name: Download build artifacts
uses: actions/download-artifact@v2.1.0
uses: actions/download-artifact@v4
with:
name: poetry-build
path: dist
Expand All @@ -68,14 +70,14 @@ jobs:
- name: Generate token
if: success() && github.event_name == 'push'
id: generate-token
uses: tibdex/github-app-token@v1.5
uses: tibdex/github-app-token@v2
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }}

- name: Create release
if: success() && github.event_name == 'push'
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
with:
token: ${{ steps.generate-token.outputs.token }}
body_path: RELEASE.md
Expand All @@ -89,19 +91,21 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2.4.0
uses: actions/checkout@v4

- name: Download build artifacts
uses: actions/download-artifact@v2.1.0
uses: actions/download-artifact@v4
with:
name: poetry-build
path: dist

- name: Set up Python
uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: 3.9

- name: Install Poetry
uses: snok/install-poetry@v1.3
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,31 +22,31 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2.4.0
uses: actions/checkout@v4

- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@v3
with:
languages: python

- name: Run CodeQL
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@v3

ossar:
name: OSSAR
runs-on: windows-latest

steps:
- name: Checkout
uses: actions/checkout@v2.4.0
uses: actions/checkout@v4

- name: Run OSSAR
id: ossar
uses: github/ossar-action@v1
uses: github/ossar-action@v2

- name: Upload OSSAR results
if: always()
uses: github/codeql-action/upload-sarif@v1
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: ${{ steps.ossar.outputs.sarifFile }}

Expand All @@ -56,7 +56,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2.4.0
uses: actions/checkout@v4

- name: Run Semgrep
uses: returntocorp/semgrep-action@v1
Expand All @@ -71,6 +71,6 @@ jobs:

- name: Upload Semgrep results
if: always()
uses: github/codeql-action/upload-sarif@v1
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: semgrep.sarif
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ jobs:
fail-fast: false
matrix:
os: [Ubuntu, macOS, Windows]
python-version: [3.7, 3.8, 3.9]
python-version: [3.8, 3.9]

steps:
- name: Checkout
uses: actions/checkout@v2.4.0
uses: actions/checkout@v4

- name: Set up TorchTS
uses: ./.github/actions/setup-torchts
Expand All @@ -43,7 +43,7 @@ jobs:

- name: Upload coverage report
if: success()
uses: codecov/codecov-action@v2.1.0
uses: codecov/codecov-action@v4
with:
file: ./coverage.xml
fail_ci_if_error: true
12 changes: 6 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,39 +6,39 @@ ci:

repos:
- repo: https://github.com/psf/black
rev: 22.1.0
rev: 24.4.0
hooks:
- id: black

- repo: https://github.com/asottile/pyupgrade
rev: v2.31.0
rev: v3.15.2
hooks:
- id: pyupgrade
args: [--py36-plus]

- repo: https://github.com/PyCQA/isort
rev: 5.10.1
rev: 5.13.2
hooks:
- id: isort
additional_dependencies: [toml]

- repo: https://github.com/flakeheaven/flakeheaven
rev: 0.11.0
rev: 3.3.0
hooks:
- id: flakeheaven
additional_dependencies:
- flake8-bugbear
- flake8-comprehensions

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
rev: v4.6.0
hooks:
- id: end-of-file-fixer
- id: mixed-line-ending
- id: trailing-whitespace

- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.1.13
rev: v1.5.5
hooks:
- id: forbid-crlf
exclude: docs/make.bat
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Existing time series analysis libraries include [statsmodels](https://www.statsm

### Installation Requirements

TorchTS supports Python 3.7+ and has the following dependencies:
TorchTS supports Python 3.8+ and has the following dependencies:

- [PyTorch](https://pytorch.org/)
- [PyTorch Lightning](https://pytorchlightning.ai/)
Expand Down
Loading

0 comments on commit ea68c50

Please sign in to comment.