chore: init task for 2023 01 #117
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Python | |
on: | |
push: | |
paths-ignore: | |
- '.github/!(workflows)/**' | |
- 'solutions/typescript/**' | |
- 'solutions/rust/**' | |
- 'Cargo.toml' | |
- 'Cargo.lock' | |
- 'package.json' | |
- 'pnpm-lock.yaml' | |
- 'pnpm-workspace.yaml' | |
- '*.json' | |
- '**/*.js' | |
- '**/*.cjs' | |
- '**/*.ts' | |
- '**/*.md' | |
pull_request: | |
paths-ignore: | |
- '.github/!(workflows)/**' | |
- 'solutions/typescript/**' | |
- 'solutions/rust/**' | |
- 'Cargo.toml' | |
- 'Cargo.lock' | |
- 'package.json' | |
- 'pnpm-lock.yaml' | |
- 'pnpm-workspace.yaml' | |
- '*.json' | |
- '**/*.js' | |
- '**/*.cjs' | |
- '**/*.ts' | |
- '**/*.md' | |
defaults: | |
run: | |
working-directory: solutions/python | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ['3.11'] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
- name: Cache | |
id: cache-venv | |
uses: actions/cache@v3 | |
with: | |
path: .venv3 | |
key: ${{ runner.os }}-${{ hashFiles('**/Pipfile.lock') }} | |
- name: Setup python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
architecture: x64 | |
- name: Install pipenv | |
run: pip install pipenv | |
- name: Install dependencies | |
if: steps.cache-venv.outputs.cache-hit != 'true' | |
run: pipenv install -d | |
- name: Lint | |
run: pipenv run lint | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ['3.11'] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
- name: Cache | |
id: cache-venv | |
uses: actions/cache@v3 | |
with: | |
path: .venv3 | |
key: ${{ runner.os }}-${{ hashFiles('**/Pipfile.lock') }} | |
- name: Setup python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
architecture: x64 | |
- name: Install pipenv | |
run: pip install pipenv | |
- name: Install dependencies | |
if: steps.cache-venv.outputs.cache-hit != 'true' | |
run: pipenv install -d | |
- name: Test | |
run: pipenv run test |