Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CI to vectorizing CU-86bvyavpu #46

Merged
merged 16 commits into from
Sep 21, 2023
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
8 changes: 6 additions & 2 deletions .devcontainer/scripts/post_create.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
#!/bin/bash
# this script install system dependencies for vectorizing and sets up conda

sudo apt-get update
sudo apt-get install -y build-essential python-dev libagg-dev libpotrace-dev pkg-config libffi-dev libcairo2-dev
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )

# install system dependencies
bash "$SCRIPT_DIR"/../../scripts/install_system_dependencies.sh

# setup conda
conda env create -n dev -f envs/dev.yaml
conda init
40 changes: 40 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: ci
on: [push, pull_request]

jobs:
ci:
name: CI
runs-on: ubuntu-latest
env:
PORT: "8000"
S3_BUCKET: "-"
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
S3_TEST_BUCKET: ${{ secrets.S3_TEST_BUCKET }}
steps:
- name: Check out repository code
uses: actions/checkout@v2
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: eu-central-1
- name: Set up Python 3.11
uses: actions/setup-python@v2
with:
python-version: 3.11
- name: Set up system dependencies
run: |
bash scripts/install_system_dependencies.sh
- name: Set up `dev` conda environment
uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: dev
environment-file: envs/dev.yaml
auto-activate-base: false
- name: Run tests
shell: bash -el {0}
run: |
conda activate dev
python -m pytest vectorizing/tests/test.py
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ The first time the execution can take few minutes, as it is pulling the dev cont
bash scripts/compile_envs.sh
```

This will compile dependencies and environments, ensuring a consistent development workflow and deployment.
This will compile dependencies and environments, ensuring a consistent development workflow and deployment.

4. If you want to add or remove **system** dependencies, update the script: [`scripts/install_system_dependencies.sh`](scripts/install_system_dependencies.sh). This is used both in CI and at dev container creation, to keep them consistent.

## Server

Expand Down
5 changes: 5 additions & 0 deletions scripts/install_system_dependencies.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash
# this script install system dependencies for vectorizing

sudo apt-get update
sudo apt-get install -y build-essential libagg-dev libpotrace-dev pkg-config libffi-dev libcairo2-dev
Loading