Skip to content

Commit

Permalink
Merge pull request #19 from 16bravo/bugfix/corrections_yaml
Browse files Browse the repository at this point in the history
corrections yaml
  • Loading branch information
16bravo authored Dec 20, 2023
2 parents dc17740 + 5029007 commit 1101d8b
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/gen_json.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,7 @@ jobs:
run: pip install -r requirements.txt

- name: Run JSON generation script
run: python scripts/json_generation.py
run: |
echo "Working Directory: $(pwd)"
echo "Files in Current Directory: $(ls -al)"
python scripts/json_generation.py
14 changes: 14 additions & 0 deletions .github/workflows/init_database.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,31 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: 3.x
- name: Vérifier l'existence de la base de données
id: check-db
run: |
if [ -f ./data/BranvoRanking.db ]; then
echo "Database exists already. No need for init."
echo "::set-output name=init_required::false"
else
echo "Database does not exist. Init needed."
echo "::set-output name=init_required::true"
fi
- name: Install dependencies
if: steps.check-db.outputs.init_required == 'true'
run: pip install -r requirements.txt

- name: Create .kaggle directory
if: steps.check-db.outputs.init_required == 'true'
run: mkdir -p /home/runner/.kaggle

- name: Set up Kaggle credentials
if: steps.check-db.outputs.init_required == 'true'
run: echo "$KAGGLE_JSON" > /home/runner/.kaggle/kaggle.json && chmod 600 /home/runner/.kaggle/kaggle.json
env:
KAGGLE_JSON: ${{ secrets.KAGGLE_JSON }}

- name: Run initialization script
if: steps.check-db.outputs.init_required == 'true'
run: python scripts/db_initialisation.py

0 comments on commit 1101d8b

Please sign in to comment.