Skip to content

Add CI

Add CI #1

Workflow file for this run

name: CI
on:
workflow_dispatch:
push:
branches:
- master
- main
pull_request:
branches:
- master
- main
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
# Update python version matrix compatible with your project
python: ["3.10", "3.11", "3.12"]
env:
# Use API Key from GA's environment variables for testing. You can remove this line if you don't need it.
SERVICE_API_KEY: ${{ secrets.SERVICE_API_KEY }}
steps:
# This will remove unnecessary files to free up space. This has done because some package needs more space to install. e.g.) torch
- name: Clean up space for action
run: rm -rf /opt/hostedtoolcache
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
# Install project dependencies with pytest and run tests
- name: Install dependencies
run: pip install -r requirements.txt pytest
# `-rs` flag is used to debug for the test failure
- name: Run test
run: python -m pytest -rs tests