From 47ae19cfb23f8744e735966e7b4e523b732c75fe Mon Sep 17 00:00:00 2001 From: vsdudakov Date: Sat, 3 Aug 2024 03:05:36 +0300 Subject: [PATCH] Fix --- .github/workflows/cd.yml | 23 +++++++++++++++++++++++ .github/workflows/ci.yml | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+) create mode 100644 .github/workflows/cd.yml create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml new file mode 100644 index 0000000..edb15b8 --- /dev/null +++ b/.github/workflows/cd.yml @@ -0,0 +1,23 @@ +name: FastAdmin CD + +on: + release: + types: [released] + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }} + cancel-in-progress: false + +jobs: + cd: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Install poetry + run: pipx install poetry + - name: Deploy Package + run: | + poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }} + poetry build + poetry publish diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..7368ef5 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,39 @@ +name: FastAdmin CI + +on: [create, push] + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + ci: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Install poetry + run: pipx install poetry + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.12' + cache: "poetry" + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: v22.4.1 + cache: 'yarn' + cache-dependency-path: 'frontend/yarn.lock' + - name: Install Dependencies + run: make install + - name: Run Lint + run: make lint + - name: Run Tests + env: + ADMIN_USER_MODEL: User + ADMIN_USER_MODEL_USERNAME_FIELD: username + ADMIN_SECRET_KEY: secret_key + run: make test + - name: Run Build + run: make -C frontend build + - name: Upload coverage reports to Codecov