Skip to content

Commit

Permalink
CI
Browse files Browse the repository at this point in the history
  • Loading branch information
sosiristseng committed Mar 21, 2024
1 parent 673ce46 commit d0a7692
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 17 deletions.
8 changes: 4 additions & 4 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
version: 2
updates:
- package-ecosystem: "pip"
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: "monthly"
- package-ecosystem: "github-actions"
interval: monthly
- package-ecosystem: pip
directory: "/"
schedule:
interval: "monthly"
interval: monthly
25 changes: 12 additions & 13 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,25 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
PYTHON_VERSION: "3.11"

jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Python ${{ env.PYTHON_VERSION }}
- name: Setup Python
uses: actions/setup-python@v5
id: cp
with:
python-version: '3.x'
- name: Cache pip dependencies
uses: actions/cache@v4
id: cache-py
if: ${{ contains(runner.name, 'GitHub Actions') }}
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Restore Python virtualenv
uses: syphar/restore-virtualenv@v1
id: cache-virtualenv
- name: Download Pip cache
uses: syphar/restore-pip-download-cache@v1
if: steps.cache-virtualenv.outputs.cache-hit != 'true'
- name: Install Python dependencies if cache miss
path: ${{ env.pythonLocation }}
key: ${{ runner.os }}-pip-${{ steps.cp.outputs.python-version }}-${{ hashFiles('requirements.txt') }}
- name: Install pip dependencies if cache miss
if: ${{ steps.cache-py.outputs.cache-hit != 'true' }}
run: pip install -r requirements.txt
if: steps.cache-virtualenv.outputs.cache-hit != 'true'
- name: Run Test
run: python smalltest.py

0 comments on commit d0a7692

Please sign in to comment.