-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
More migration stuff, more endpoints, map categories
- First attempt at a CI and make a docker file for tests PR: #3
- Loading branch information
1 parent
b5d2201
commit e638a70
Showing
5 changed files
with
55 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: CI | ||
on: | ||
pull_request: | ||
push: { branches: main } | ||
|
||
jobs: | ||
test: | ||
name: Run PyTest | ||
runs-on: ubuntu-latest | ||
env: | ||
COMPOSE_FILE: docker-compose.yml | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Build docker images | ||
run: docker-compose build | ||
|
||
- name: Run PyTest | ||
run: docker-compose run test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
FROM python:3.12-bookworm as base | ||
|
||
ENV PYTHONDONTWRITEBYTECODE=1 | ||
ENV PYTHONUNBUFFERED=1 | ||
WORKDIR /cncnet-map-api | ||
|
||
# This is just here to crash the build if you don't make a .env file. | ||
COPY .env /cncnet-map-api/ | ||
|
||
# Copy files needed for build | ||
COPY requirements.txt /cncnet-map-api | ||
COPY requirements-dev.txt /cncnet-map-api | ||
COPY start.sh /cncnet-map-api | ||
|
||
RUN apt-get update && apt-get install -y liblzo2-dev | ||
RUN pip install --upgrade pip | ||
RUN CFLAGS=-I$(brew --prefix)/include LDFLAGS=-L$(brew --prefix)/lib pip install -r requirements-dev.txt |