Skip to content

Commit

Permalink
Autoformat yml files
Browse files Browse the repository at this point in the history
  • Loading branch information
BurnySc2 committed Dec 17, 2024
1 parent 322fba4 commit 5d3fecb
Show file tree
Hide file tree
Showing 8 changed files with 404 additions and 412 deletions.
90 changes: 44 additions & 46 deletions .github/workflows/earthly_project_check.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
name: run_earthly_checks


on: [push, pull_request]

jobs:
Expand All @@ -9,53 +8,52 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ['3.12']
python-version: ["3.12"]
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4

# In conflict with pyre-check
# - name: Set up Python ${{ matrix.python-version }}
# uses: actions/setup-python@v4
# with:
# python-version: ${{ matrix.python-version }}
#
# - name: Cache burny_common .venv
# uses: actions/cache@v3
# with:
# path: burny_common/.venv
# key: burny_common-${{ matrix.os }}-${{ steps.setup-python.outputs.python-version }}-poetry-${{ hashFiles('poetry.lock') }}
#
# - name: Cache discord_bot .venv
# uses: actions/cache@v3
# with:
# path: discord_bot/.venv
# key: discord_bot-${{ matrix.os }}-${{ steps.setup-python.outputs.python-version }}-poetry-${{ hashFiles('poetry.lock') }}
#
# - name: Cache fastapi_server .venv
# uses: actions/cache@v3
# with:
# path: fastapi_server/.venv
# key: fastapi_server-${{ matrix.os }}-${{ steps.setup-python.outputs.python-version }}-poetry-${{ hashFiles('poetry.lock') }}
#
# - name: Cache python_examples .venv
# uses: actions/cache@v3
# with:
# path: python_examples/.venv
# key: python_examples-${{ matrix.os }}-${{ steps.setup-python.outputs.python-version }}-poetry-${{ hashFiles('poetry.lock') }}

# https://earthly.dev/get-earthly
- name: Install Earthly
run: sudo /bin/sh -c 'wget https://github.com/earthly/earthly/releases/latest/download/earthly-linux-amd64 -O /usr/local/bin/earthly && chmod +x /usr/local/bin/earthly && /usr/local/bin/earthly bootstrap --with-autocomplete'

- name: Install
run: |
touch discord_bot/SECRETS.toml
earthly +install-all --verbose true --PYTHONVERSION=${{ matrix.python-version }}
- name: Run code checks and tests
run: earthly +all --verbose true --PYTHONVERSION=${{ matrix.python-version }}

- uses: actions/checkout@v4

# In conflict with pyre-check
# - name: Set up Python ${{ matrix.python-version }}
# uses: actions/setup-python@v4
# with:
# python-version: ${{ matrix.python-version }}
#
# - name: Cache burny_common .venv
# uses: actions/cache@v3
# with:
# path: burny_common/.venv
# key: burny_common-${{ matrix.os }}-${{ steps.setup-python.outputs.python-version }}-poetry-${{ hashFiles('poetry.lock') }}
#
# - name: Cache discord_bot .venv
# uses: actions/cache@v3
# with:
# path: discord_bot/.venv
# key: discord_bot-${{ matrix.os }}-${{ steps.setup-python.outputs.python-version }}-poetry-${{ hashFiles('poetry.lock') }}
#
# - name: Cache fastapi_server .venv
# uses: actions/cache@v3
# with:
# path: fastapi_server/.venv
# key: fastapi_server-${{ matrix.os }}-${{ steps.setup-python.outputs.python-version }}-poetry-${{ hashFiles('poetry.lock') }}
#
# - name: Cache python_examples .venv
# uses: actions/cache@v3
# with:
# path: python_examples/.venv
# key: python_examples-${{ matrix.os }}-${{ steps.setup-python.outputs.python-version }}-poetry-${{ hashFiles('poetry.lock') }}

# https://earthly.dev/get-earthly
- name: Install Earthly
run: sudo /bin/sh -c 'wget https://github.com/earthly/earthly/releases/latest/download/earthly-linux-amd64 -O /usr/local/bin/earthly && chmod +x /usr/local/bin/earthly && /usr/local/bin/earthly bootstrap --with-autocomplete'

- name: Install
run: |
touch discord_bot/SECRETS.toml
earthly +install-all --verbose true --PYTHONVERSION=${{ matrix.python-version }}
- name: Run code checks and tests
run: earthly +all --verbose true --PYTHONVERSION=${{ matrix.python-version }}
# - name: Save cache
# run: earthly +export-cache-backend --verbose true --PYTHONVERSION=${{ matrix.python-version }}
141 changes: 70 additions & 71 deletions .github/workflows/publish_burny_common.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
name: publish_burny_common


on:
push:
paths:
- burny_common/**
- .github/workflows/publish_burny_common.yml
- burny_common/**
- .github/workflows/publish_burny_common.yml
pull_request:
branches:
- master
- develop
- master
- develop

env:
SUBDIRECTORY: burny_common
Expand All @@ -21,81 +20,81 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ['3.9', '3.10', '3.11', '3.12']
python-version: ["3.9", "3.10", "3.11", "3.12"]
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4

# In conflict with pyre-check
# - name: Set up Python ${{ matrix.python-version }}
# uses: actions/setup-python@v4
# with:
# python-version: ${{ matrix.python-version }}
#
# - name: Cache .venv
# uses: actions/cache@v3
# with:
# path: .venv
# key: ${{ env.SUBDIRECTORY }}-${{ matrix.os }}-${{ steps.setup-python.outputs.python-version }}-poetry-${{ hashFiles('poetry.lock') }}

# https://earthly.dev/get-earthly
- name: Install Earthly
run: sudo /bin/sh -c 'wget https://github.com/earthly/earthly/releases/latest/download/earthly-linux-amd64 -O /usr/local/bin/earthly && chmod +x /usr/local/bin/earthly && /usr/local/bin/earthly bootstrap --with-autocomplete'

- name: Install
working-directory: ${{ env.SUBDIRECTORY }}
run: earthly +install-dev --verbose true --PYTHONVERSION=${{ matrix.python-version }}

- name: Run code checks and tests
working-directory: ${{ env.SUBDIRECTORY }}
run: earthly +all --verbose true --PYTHONVERSION=${{ matrix.python-version }}

# - name: Save cache
# working-directory: ${{ env.SUBDIRECTORY }}
# run: earthly +export-cache --verbose true --PYTHONVERSION=${{ matrix.python-version }}
- uses: actions/checkout@v4

# In conflict with pyre-check
# - name: Set up Python ${{ matrix.python-version }}
# uses: actions/setup-python@v4
# with:
# python-version: ${{ matrix.python-version }}
#
# - name: Cache .venv
# uses: actions/cache@v3
# with:
# path: .venv
# key: ${{ env.SUBDIRECTORY }}-${{ matrix.os }}-${{ steps.setup-python.outputs.python-version }}-poetry-${{ hashFiles('poetry.lock') }}

# https://earthly.dev/get-earthly
- name: Install Earthly
run: sudo /bin/sh -c 'wget https://github.com/earthly/earthly/releases/latest/download/earthly-linux-amd64 -O /usr/local/bin/earthly && chmod +x /usr/local/bin/earthly && /usr/local/bin/earthly bootstrap --with-autocomplete'

- name: Install
working-directory: ${{ env.SUBDIRECTORY }}
run: earthly +install-dev --verbose true --PYTHONVERSION=${{ matrix.python-version }}

- name: Run code checks and tests
working-directory: ${{ env.SUBDIRECTORY }}
run: earthly +all --verbose true --PYTHONVERSION=${{ matrix.python-version }}

# - name: Save cache
# working-directory: ${{ env.SUBDIRECTORY }}
# run: earthly +export-cache --verbose true --PYTHONVERSION=${{ matrix.python-version }}

build_and_publish:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ['3.12']
python-version: ["3.12"]
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
id: setup-python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install uv
run: pip install uv

- name: Install packages
working-directory: ${{ env.SUBDIRECTORY }}
run: uv sync --frozen --no-cache --no-install-project

- name: Build project
working-directory: ${{ env.SUBDIRECTORY }}
run: uv build

- id: wait-for-jobs
uses: yogeshlonkar/wait-for-jobs@v0
with:
gh-token: ${{ secrets.GITHUB_TOKEN }}
jobs: |
run_code_check_py3.9
run_code_check_py3.10
run_code_check_py3.11
run_code_check_py3.12
# Publish package on pypi
- name: Publish
if: github.ref == 'refs/heads/develop' && github.event_name == 'push'
working-directory: ${{ env.SUBDIRECTORY }}
continue-on-error: true
run: uv publish --token ${{ secrets.pypi_burny_common_token }}
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
id: setup-python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install uv
run: pip install uv

- name: Install packages
working-directory: ${{ env.SUBDIRECTORY }}
run: uv sync --frozen --no-cache --no-install-project

- name: Build project
working-directory: ${{ env.SUBDIRECTORY }}
run: uv build

- id: wait-for-jobs
uses: yogeshlonkar/wait-for-jobs@v0
with:
gh-token: ${{ secrets.GITHUB_TOKEN }}
jobs: |
run_code_check_py3.9
run_code_check_py3.10
run_code_check_py3.11
run_code_check_py3.12
# Publish package on pypi
- name: Publish
if: github.ref == 'refs/heads/develop' && github.event_name == 'push'
working-directory: ${{ env.SUBDIRECTORY }}
continue-on-error: true
run: uv publish --token ${{ secrets.pypi_burny_common_token }}
Loading

0 comments on commit 5d3fecb

Please sign in to comment.