forked from StepicOrg/epicbox
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
119 additions
and
0 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,6 @@ | ||
**YouTrack Issues**: | ||
[#HSPC-](https://vyahhi.myjetbrains.com/youtrack/issue/HSPC-) | ||
|
||
**Check list** | ||
|
||
**Description** |
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,26 @@ | ||
name: 'Prepare environment' | ||
description: 'Prepare environment' | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Show ubuntu version | ||
run: lsb_release -a | ||
shell: bash | ||
- run: sudo apt-get update | ||
shell: bash | ||
- name: Setup libraries | ||
run: | | ||
sudo apt-get install -y \ | ||
pipx | ||
shell: bash | ||
- name: Install Poetry | ||
run: pipx install poetry | ||
shell: bash | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.11" | ||
cache: 'poetry' | ||
- name: Install dependencies | ||
run: poetry install --only main,dev --no-interaction --no-ansi | ||
shell: bash |
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,14 @@ | ||
name: Auto Author Assign | ||
|
||
on: | ||
pull_request_target: | ||
types: [ opened, reopened ] | ||
|
||
permissions: | ||
pull-requests: write | ||
|
||
jobs: | ||
assign-author: | ||
runs-on: [self-hosted, small] | ||
steps: | ||
- uses: toshimaru/[email protected] |
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,30 @@ | ||
name: Format code | ||
on: | ||
push: | ||
branches: | ||
- 'master' | ||
pull_request: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref_name }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
format: | ||
name: Format with black and ruff | ||
runs-on: [self-hosted, small] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
repository: ${{ github.event.pull_request.head.repo.full_name }} | ||
ref: ${{ github.event.pull_request.head.ref }} | ||
- uses: ./.github/workflows/actions/prepare | ||
- run: poetry run black . | ||
- run: poetry run ruff --fix --exit-zero . | ||
- name: Commit changes | ||
uses: EndBug/add-and-commit@v9 | ||
with: | ||
fetch: false | ||
default_author: github_actions | ||
message: 'Auto format' | ||
add: '.' |
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,26 @@ | ||
name: Deploy | ||
on: | ||
push: | ||
branches: | ||
- 'master' | ||
pull_request: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref_name }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
tests: | ||
name: Tests | ||
runs-on: [self-hosted, small] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: ./.github/workflows/actions/prepare | ||
- name: Login to Docker Hub | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: hyperskill.azurecr.io | ||
username: ${{ secrets.REGISTRY_USER }} | ||
password: ${{ secrets.REGISTRY_PASSWORD }} | ||
- run: docker pull hyperskill.azurecr.io/epicbox/python:3.10.6-011c5b05a | ||
- run: poetry run pytest . |
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