From ca48b222f339e5a4f1d1b1d17f14861cca565a58 Mon Sep 17 00:00:00 2001 From: Andrew Brookins Date: Tue, 2 Nov 2021 17:08:32 -0700 Subject: [PATCH] Fix yaml for CI #blessed --- .github/workflows/ci.yml | 273 +++++++++++++++++++-------------------- 1 file changed, 136 insertions(+), 137 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c383c5c..58804f9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,7 @@ on: - '[0-9].[0-9]+' - 'update/pre-commit-autoupdate' schedule: - - cron: '0 6 * * *' # Daily 6AM UTC build + - cron: '0 6 * * *' # Daily 6AM UTC build jobs: @@ -22,57 +22,57 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 5 steps: - - name: Checkout - uses: actions/checkout@v2.3.5 - - name: Setup Python 3.9 - uses: actions/setup-python@v2 - with: - python-version: 3.9 - #---------------------------------------------- - # ----- install & configure poetry ----- - #---------------------------------------------- - - name: Install Poetry - uses: snok/install-poetry@v1 - with: - virtualenvs-create: true - virtualenvs-in-project: true - installer-parallel: true - #---------------------------------------------- - # load cached venv if cache exists - #---------------------------------------------- - - name: Load cached venv - id: cached-poetry-dependencies - uses: actions/cache@v2 - with: - path: .venv - key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }} - #---------------------------------------------- - # install dependencies if cache does not exist - #---------------------------------------------- - - name: Install dependencies - if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' - run: poetry install --no-interaction --no-root - #---------------------------------------------- - # install your root project, if required - #---------------------------------------------- - - name: Install library - run: poetry install --no-interaction - #---------------------------------------------- - # run test suite - #---------------------------------------------- - - name: Run linter - run: | - make dist - make lint + - name: Checkout + uses: actions/checkout@v2.3.5 + - name: Setup Python 3.9 + uses: actions/setup-python@v2 + with: + python-version: 3.9 + #---------------------------------------------- + # ----- install & configure poetry ----- + #---------------------------------------------- + - name: Install Poetry + uses: snok/install-poetry@v1 + with: + virtualenvs-create: true + virtualenvs-in-project: true + installer-parallel: true + #---------------------------------------------- + # load cached venv if cache exists + #---------------------------------------------- + - name: Load cached venv + id: cached-poetry-dependencies + uses: actions/cache@v2 + with: + path: .venv + key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }} + #---------------------------------------------- + # install dependencies if cache does not exist + #---------------------------------------------- + - name: Install dependencies + if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' + run: poetry install --no-interaction --no-root + #---------------------------------------------- + # install your root project, if required + #---------------------------------------------- + - name: Install library + run: poetry install --no-interaction + #---------------------------------------------- + # run test suite + #---------------------------------------------- + - name: Run linter + run: | + make dist + make lint test-unix: name: Test Unix needs: lint strategy: matrix: - os: [ubuntu-latest] - pyver: [3.6, 3.7, 3.8, 3.9, pypy3] - redismod: ["preview"] # Removed "edge" because it's broken currently + os: [ ubuntu-latest ] + pyver: [ 3.6, 3.7, 3.8, 3.9, pypy3 ] + redismod: [ "preview" ] # Removed "edge" because it's broken currently fail-fast: false services: redis: @@ -92,96 +92,95 @@ jobs: OS: ${{ matrix.os }} INSTALL_DIR: ${{ github.workspace }}/redis steps: - - name: Checkout - uses: actions/checkout@v2.3.5 - - name: Setup Python ${{ matrix.pyver }} - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.pyver }} - #---------------------------------------------- - # ----- install & configure poetry ----- - #---------------------------------------------- - - name: Install Poetry - uses: snok/install-poetry@v1 - with: - virtualenvs-create: true - virtualenvs-in-project: true - installer-parallel: true - #---------------------------------------------- - # load cached venv if cache exists - #---------------------------------------------- - - name: Load cached venv - id: cached-poetry-dependencies - uses: actions/cache@v2 - with: - path: .venv - key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }} - #---------------------------------------------- - # install dependencies if cache does not exist - #---------------------------------------------- - - name: Install dependencies - if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' - run: poetry install --no-interaction --no-root - #---------------------------------------------- - # install your root project, if required - #---------------------------------------------- - - name: Install library - run: poetry install --no-interaction - - name: Run unittests (redismod:${{ matrix.redismod }}, ${{ matrix.os }}) - run: | - make test - poetry run coverage xml - - name: Upload coverage - uses: codecov/codecov-action@v2.1.0 - with: - file: ./coverage.xml - flags: unit - env_vars: OS - fail_ci_if_error: false + - name: Checkout + uses: actions/checkout@v2.3.5 + - name: Setup Python ${{ matrix.pyver }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.pyver }} + #---------------------------------------------- + # ----- install & configure poetry ----- + #---------------------------------------------- + - name: Install Poetry + uses: snok/install-poetry@v1 + with: + virtualenvs-create: true + virtualenvs-in-project: true + installer-parallel: true + #---------------------------------------------- + # load cached venv if cache exists + #---------------------------------------------- + - name: Load cached venv + id: cached-poetry-dependencies + uses: actions/cache@v2 + with: + path: .venv + key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }} + #---------------------------------------------- + # install dependencies if cache does not exist + #---------------------------------------------- + - name: Install dependencies + if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' + run: poetry install --no-interaction --no-root + #---------------------------------------------- + # install your root project, if required + #---------------------------------------------- + - name: Install library + run: poetry install --no-interaction + - name: Run unittests (redismod:${{ matrix.redismod }}, ${{ matrix.os }}) + run: | + make test + poetry run coverage xml + - name: Upload coverage + uses: codecov/codecov-action@v2.1.0 + with: + file: ./coverage.xml + flags: unit + env_vars: OS + fail_ci_if_error: false deploy: - name: Deploy - runs-on: ubuntu-latest - needs: test-unix - # Run only on pushing a tag - if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') - steps: - - name: Checkout - uses: actions/checkout@v2.3.5 - - name: Setup Python 3.9 - uses: actions/setup-python@v2 - with: - python-version: 3.9 - - - name: Install Poetry - uses: snok/install-poetry@v1 - with: - virtualenvs-create: true - virtualenvs-in-project: true - installer-parallel: true - #---------------------------------------------- - # load cached venv if cache exists - #---------------------------------------------- - - name: Load cached venv - id: cached-poetry-dependencies - uses: actions/cache@v2 - with: - path: .venv - key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }} - #---------------------------------------------- - # install dependencies if cache does not exist - #---------------------------------------------- - - name: Install dependencies - if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' - run: poetry install --no-interaction --no-root - #---------------------------------------------- - # install your root project, if required - #---------------------------------------------- - - name: Install library - run: poetry install --no-interaction - - name: PyPI upload - env: - TWINE_USERNAME: __token__ - TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} - run: | - make upload + name: Deploy + runs-on: ubuntu-latest + needs: test-unix + # Run only on pushing a tag + if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') + steps: + - name: Checkout + uses: actions/checkout@v2.3.5 + - name: Setup Python 3.9 + uses: actions/setup-python@v2 + with: + python-version: 3.9 + - name: Install Poetry + uses: snok/install-poetry@v1 + with: + virtualenvs-create: true + virtualenvs-in-project: true + installer-parallel: true + #---------------------------------------------- + # load cached venv if cache exists + #---------------------------------------------- + - name: Load cached venv + id: cached-poetry-dependencies + uses: actions/cache@v2 + with: + path: .venv + key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }} + #---------------------------------------------- + # install dependencies if cache does not exist + #---------------------------------------------- + - name: Install dependencies + if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' + run: poetry install --no-interaction --no-root + #---------------------------------------------- + # install your root project, if required + #---------------------------------------------- + - name: Install library + run: poetry install --no-interaction + - name: PyPI upload + env: + TWINE_USERNAME: __token__ + TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} + run: | + make upload