Skip to content

add solution isMonotonic python #23

add solution isMonotonic python

add solution isMonotonic python #23

Workflow file for this run

name: Run Tests
on:
pull_request:
types: [opened, synchronize, reopened]
jobs:
test:
name: Run Jest tests
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Check for Typescript files
id: ts-files
run: |
is_typescript=$(find . -name '*.ts' -print -quit)
if [ -n "$is_typescript" ]; then
echo "Found TypeScript files"
echo "is_typescript=true" >> "$GITHUB_OUTPUT"
else
echo "No TypeScript files found"
echo "is_typescript=false" >> "$GITHUB_OUTPUT"
fi
- name: Install dependencies and run Jest
if: steps.ts-files.outputs.is_typescript == 'true'
run: npm install |
npm test -- --coverage --ci
- name: Set up Python
if: steps.ts-files.outputs.is_typescript == 'false'
uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'pip'
- name: Install dependencies
run: pip install -r requirements.txt
- name: Run Python tests
if: steps.ts-files.outputs.is_typescript == 'false'
run: python -m unittest discover -p '*_test.py'