Skip to content

Python CI

Python CI #333

Workflow file for this run

name: Python CI
on:
push:
branches:
- '**'
schedule:
- cron: '0 17 * * *'
jobs:
check_code_format:
name: Check code format
runs-on: ubuntu-latest
if: github.event_name == 'push' || (github.event_name == 'schedule' && github.ref == 'refs/heads/main')
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: ./.github/workflows/common
- name: Check code format
run: ./dev.py black-check
check_types:
name: Check types
runs-on: ubuntu-latest
if: github.event_name == 'push' || (github.event_name == 'schedule' && github.ref == 'refs/heads/main')
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: ./.github/workflows/common
- name: Check types
run: ./dev.py check-types
check_lint:
name: Check lint
runs-on: ubuntu-latest
if: github.event_name == 'push' || (github.event_name == 'schedule' && github.ref == 'refs/heads/main')
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: ./.github/workflows/common
- name: Check lint
run: ./dev.py lint
build_and_upload:
name: Build and upload
runs-on: ubuntu-latest
if: github.event_name == 'push' || (github.event_name == 'schedule' && github.ref == 'refs/heads/main')
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: ./.github/workflows/common
- name: Build the lambda function
run: ./dev.py build
- name: Upload distributable
uses: actions/upload-artifact@v4
with:
name: lambda
path: lambdas/s3-sync-lambda.zip