Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 8 additions & 30 deletions .github/workflows/codestyle.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,10 @@
# This workflow will install Python dependencies, run tests, run linting, and test building docs
name: Codestyle and Linting

on:
pull_request:
branches:
- main
workflow_dispatch: # For on demand runs
schedule:
- cron: 0 0 * * * # Scheduled run every day at midnight
name: Codestyle and linting with Ruff
on: [ push, pull_request ]
jobs:
build:

runs-on: ${{ matrix.platform }}
strategy:
fail-fast: false
matrix:
platform: [ubuntu-latest]
python-version: [3.9]
ruff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
- name: Lint Code with Black
run: |
black --check --diff lambda_function
- name: Lint Code with Flake
run: |
flake8 --count --max-line-length 88 lambda_function

- uses: actions/checkout@v4
- uses: astral-sh/ruff-action@v3
- run: ruff check --fix
- run: ruff format
Comment thread
Alrobbertz marked this conversation as resolved.
24 changes: 12 additions & 12 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,27 +10,27 @@ on:
- cron: 0 0 * * * # Scheduled run every day at midnight
jobs:
build:
runs-on: ubuntu-20.04
container:
image: public.ecr.aws/w5r9l1c8/dev-swsoc-docker-lambda-base:latest
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- uses: actions/checkout@v4
# Set up Python 3.10 to match the version of Python used in AWS Lambda
- name: Set up Python 10
uses: actions/setup-python@v3
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: 3.10.12
python-version: '3.10'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
python -m pip install -r requirements.dev.txt
Comment thread
Alrobbertz marked this conversation as resolved.

- name: Run tests
run: |
pytest --pyargs lambda_function --cov lambda_function/src
env:
SWXSOC_MISSION: hermes
pytest --pyargs lambda_function/tests --cov=lambda_function/src --cov-report=html
Comment thread
Alrobbertz marked this conversation as resolved.
Comment thread
Alrobbertz marked this conversation as resolved.

# Upload coverage reports to Codecov
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
19 changes: 0 additions & 19 deletions lambda_function/src/config.yaml

This file was deleted.

Loading
Loading