-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #35 from BurnySc2/develop
- Loading branch information
Showing
552 changed files
with
33,677 additions
and
95,910 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,61 @@ | ||
name: run_earthly_checks | ||
|
||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
run_earthly_checks: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest] | ||
python-version: ['3.10', '3.11'] | ||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
# 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 }} |
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,110 @@ | ||
name: publish_burny_common | ||
|
||
|
||
on: | ||
push: | ||
paths: | ||
- burny_common/** | ||
- .github/workflows/publish_burny_common.yml | ||
pull_request: | ||
branches: | ||
- master | ||
- develop | ||
|
||
env: | ||
SUBDIRECTORY: burny_common | ||
|
||
jobs: | ||
run_code_check: | ||
name: run_code_check_py${{ matrix.python-version }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest] | ||
python-version: ['3.8', '3.9', '3.10', '3.11'] | ||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
# 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.10'] | ||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
id: setup-python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install Poetry | ||
run: pip install poetry | ||
|
||
- name: Make poetry use local .venv folder | ||
run: poetry config virtualenvs.in-project true | ||
|
||
- name: Set up cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: ${{ env.SUBDIRECTORY }}/.venv | ||
key: ${{ matrix.os }}-${{ steps.setup-python.outputs.python-version }}-poetry-${{ env.SUBDIRECTORY }}-${{ hashFiles('poetry.lock') }} | ||
|
||
- name: Install dependencies | ||
working-directory: ${{ env.SUBDIRECTORY }} | ||
run: poetry install --no-dev | ||
|
||
- name: Build | ||
working-directory: ${{ env.SUBDIRECTORY }} | ||
run: poetry build | ||
|
||
- id: wait-for-jobs | ||
uses: yogeshlonkar/wait-for-jobs@v0 | ||
with: | ||
gh-token: ${{ secrets.GITHUB_TOKEN }} | ||
jobs: | | ||
run_code_check_py3.8 | ||
run_code_check_py3.9 | ||
run_code_check_py3.10 | ||
run_code_check_py3.11 | ||
# 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: poetry publish --username ${{ secrets.pypi_username }} --password ${{ secrets.pypi_password }} |
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.