Skip to content

Commit

Permalink
Start CI with docker: until token with DockerHub
Browse files Browse the repository at this point in the history
  • Loading branch information
AntoineTSP committed Apr 14, 2024
1 parent 3f60d5e commit 4c1eea2
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Python package

on: [push]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
# latest python minor
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pylint
- name: Lint
run: |
pylint src --fail-under=6
- name: Test Python code
run: python test.py
17 changes: 17 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM ubuntu:22.04

WORKDIR ./ResultAthle/

# Install Python
RUN apt-get -y update && \
apt-get install -y python3-pip

# Install project dependencies
COPY requirements.txt .
RUN pip install -r requirements.txt

COPY test.py .
COPY utils ./utils
COPY src ./src
COPY main.ipynb .
CMD ["python3", "test.py"]
10 changes: 10 additions & 0 deletions test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import utils.scraping as scraping
import utils.stat as stat

import matplotlib.pyplot as plt
import numpy as np
import pandas as pd

data = scraping.get_results("https://bases.athle.fr/asp.net/liste.aspx?frmbase=resultats&frmmode=1&frmespace=0&frmcompetition=282742", 13)

print(data.head())

0 comments on commit 4c1eea2

Please sign in to comment.