Skip to content

Commit

Permalink
PRO-37: update apolo dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
YevheniiSemendiak committed Sep 5, 2024
1 parent 5447e05 commit 73074a2
Show file tree
Hide file tree
Showing 4 changed files with 87 additions and 175 deletions.
88 changes: 24 additions & 64 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,76 +2,36 @@ name: CI

on:
push:
branches: [ master, release ]
branches: [master, release]
pull_request:
branches: [ master ]
pull_request_target:
branches: [master]
release:
types: [ published ]

types: [published]

jobs:

test:
if: |
(github.event_name != 'pull_request_target' && github.actor != 'dependabot[bot]') ||
(github.event_name == 'pull_request_target' && github.actor == 'dependabot[bot]')
name: Run tests
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10']
os: [ubuntu, macos, windows]
fail-fast: false
runs-on: ${{ matrix.os }}-latest
env:
PYTHONIOENCODING: utf-8
name: All checks are passed
uses: ./.github/workflows/test.yaml

approve:
name: Approve bot PR
runs-on: ubuntu-latest
if: endsWith(github.actor, '[bot]')
needs: test
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout commit
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}

- name: Install python ${{ matrix.python-version }}
uses: actions/setup-python@v4
- name: Checkout
uses: actions/checkout@v4
- name: metadata
id: metadata
if: github.actor == 'dependabot[bot]'
uses: dependabot/fetch-metadata@v2
with:
python-version: ${{ matrix.python-version }}

- name: Cache Python and its deps
uses: actions/cache@v3
with:
key: ${{ runner.os }}-python-${{ matrix.python-version }}-${{ hashFiles('requirements/*.txt') }}
path: ${{ env.pythonLocation }}

- name: Install GNU libraries for MacOS
if: matrix.os == 'macos'
shell: bash
run: |
HOMEBREW_NO_AUTO_UPDATE=1 brew install findutils
echo PATH="/usr/local/opt/findutils/libexec/gnubin:$PATH" >> $GITHUB_ENV
- name: Install python dependencies
run: |
make setup
- name: Configure environment
run: |
neuro config login-with-token ${{ secrets.CLIENT_TEST_E2E_USER_NAME }} https://dev.neu.ro/api/v1
neuro --color=no config show
- uses: webfactory/[email protected]
# Authenticates ssh on worker to pull repos under github.com/neuro-actions via ssh
# Y.S. key is used
with:
ssh-private-key: ${{ secrets.GH_NF_ACTIONS_SSH_PRIVATE }}
log-public-key: false

- name: Lint
run: |
make lint
- name: Run tests
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Enable auto-merge for bot PRs
run: gh pr merge --auto --squash --delete-branch "$PR_URL"
env:
NEURO_USER: ${{ secrets.CLIENT_TEST_E2E_USER_NAME }}
run: |
make test
PR_URL: ${{ github.event.pull_request.html_url }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36 changes: 0 additions & 36 deletions .github/workflows/remove-automerge.yml

This file was deleted.

75 changes: 0 additions & 75 deletions .github/workflows/setup-automerge.yml

This file was deleted.

63 changes: 63 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
on:
workflow_call: {}

jobs:
test:
name: Run tests
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10"]
os: [ubuntu, macos, windows]
fail-fast: false
runs-on: ${{ matrix.os }}-latest
env:
PYTHONIOENCODING: utf-8
steps:
- name: Checkout commit
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}

- name: Install python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Cache Python and its deps
uses: actions/cache@v3
with:
key: ${{ runner.os }}-python-${{ matrix.python-version }}-${{ hashFiles('requirements/*.txt') }}
path: ${{ env.pythonLocation }}

- name: Install GNU libraries for MacOS
if: matrix.os == 'macos'
shell: bash
run: |
HOMEBREW_NO_AUTO_UPDATE=1 brew install findutils
echo PATH="/usr/local/opt/findutils/libexec/gnubin:$PATH" >> $GITHUB_ENV
- name: Install python dependencies
run: |
make setup
- name: Configure environment
run: |
neuro config login-with-token ${{ secrets.CLIENT_TEST_E2E_USER_NAME }} https://dev.neu.ro/api/v1
neuro --color=no config show
- uses: webfactory/[email protected]
# Authenticates ssh on worker to pull repos under github.com/neuro-actions via ssh
# Y.S. key is used
with:
ssh-private-key: ${{ secrets.GH_NF_ACTIONS_SSH_PRIVATE }}
log-public-key: false

- name: Lint
run: |
make lint
- name: Run tests
env:
NEURO_USER: ${{ secrets.CLIENT_TEST_E2E_USER_NAME }}
run: |
make test

0 comments on commit 73074a2

Please sign in to comment.