Skip to content

Commit

Permalink
call action
Browse files Browse the repository at this point in the history
  • Loading branch information
SKairinos committed Dec 14, 2023
1 parent 8c7e197 commit 0bf84a0
Showing 1 changed file with 61 additions and 50 deletions.
111 changes: 61 additions & 50 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,65 +14,76 @@ env:
PYTHON_VERSION: 3.8

jobs:
test:
docs:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [3.8]
steps:
- name: 🛫 Checkout
uses: actions/checkout@v3

- name: 🐍 Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
- uses: actions/checkout@v4
- id: foo
uses: actions/[email protected]
with:
python-version: ${{ matrix.python-version }}
who-to-greet: 'Mona the Octocat'
- run: echo random-number ${{ steps.foo.outputs.random-number }}
shell: bash

- name: 🛠 Install Dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pipenv
pipenv install --dev
# test:
# runs-on: ubuntu-latest
# strategy:
# fail-fast: false
# matrix:
# python-version: [3.8]
# steps:
# - name: 🛫 Checkout
# uses: actions/checkout@v3

- name: 🔎 Check Code Format
run: if ! pipenv run black --check .; then exit 1; fi
# - name: 🐍 Set up Python ${{ matrix.python-version }}
# uses: actions/setup-python@v4
# with:
# python-version: ${{ matrix.python-version }}

- name: 🔎 Check Migrations
run: pipenv run python manage.py makemigrations --check --dry-run
# - name: 🛠 Install Dependencies
# run: |
# python -m pip install --upgrade pip
# python -m pip install pipenv
# pipenv install --dev

# TODO: assert code coverage target.
- name: 🧪 Test Code Units
run: pipenv run pytest
# - name: 🔎 Check Code Format
# run: if ! pipenv run black --check .; then exit 1; fi

release:
concurrency: release
runs-on: ubuntu-latest
needs: [test]
if: github.ref_name == 'main'
steps:
- name: 🛫 Checkout
uses: actions/checkout@v3
with:
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
fetch-depth: 0
# - name: 🔎 Check Migrations
# run: pipenv run python manage.py makemigrations --check --dry-run

- name: 🐍 Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
# # TODO: assert code coverage target.
# - name: 🧪 Test Code Units
# run: pipenv run pytest

# release:
# concurrency: release
# runs-on: ubuntu-latest
# needs: [test]
# if: github.ref_name == 'main'
# steps:
# - name: 🛫 Checkout
# uses: actions/checkout@v3
# with:
# token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
# fetch-depth: 0

# - name: 🐍 Set up Python
# uses: actions/setup-python@v4
# with:
# python-version: ${{ env.PYTHON_VERSION }}

- name: 🛠 Install Dependencies
run: |
python -m pip install --upgrade pip
python -m pip install python-semantic-release~=7.33
# - name: 🛠 Install Dependencies
# run: |
# python -m pip install --upgrade pip
# python -m pip install python-semantic-release~=7.33

- name: ⚙️ Configure Git
run: |
git config --local user.name cfl-bot
git config --local user.email [email protected]
# - name: ⚙️ Configure Git
# run: |
# git config --local user.name cfl-bot
# git config --local user.email [email protected]

- name: 🚀 Publish Semantic Release
env:
GH_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
run: semantic-release publish --verbosity=INFO
# - name: 🚀 Publish Semantic Release
# env:
# GH_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
# run: semantic-release publish --verbosity=INFO

0 comments on commit 0bf84a0

Please sign in to comment.