Skip to content

Commit

Permalink
Revert pipelines
Browse files Browse the repository at this point in the history
  • Loading branch information
dyakovri committed Apr 8, 2024
1 parent 42062d7 commit 6a2cd19
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 97 deletions.
28 changes: 21 additions & 7 deletions .github/workflows/main_commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Тесты и раскатка в тестовую среду

on:
push:
branches: ['main']
branches: ["main"]

env:
REGISTRY: ghcr.io
Expand All @@ -16,13 +16,20 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- uses: oven-sh/setup-bun@v1
- uses: pnpm/action-setup@v2
with:
version: 7.26.3

- uses: actions/setup-node@v3
with:
node-version: "18"
cache: "pnpm"

- name: Install
run: bun install
run: pnpm install

- name: Check
run: bun run check
run: pnpm run check

test-format:
name: Выполняем тесты
Expand All @@ -31,13 +38,20 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- uses: oven-sh/setup-bun@v1
- uses: pnpm/action-setup@v2
with:
version: 7.26.3

- uses: actions/setup-node@v3
with:
node-version: "18"
cache: "pnpm"

- name: Install
run: bun install
run: pnpm install

- name: Check
run: bun test
run: pnpm test

build-test-image:
name: Собираем тестовый Docker
Expand Down
24 changes: 0 additions & 24 deletions .github/workflows/pr_close.yml

This file was deleted.

84 changes: 19 additions & 65 deletions .github/workflows/pr_create.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,20 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- uses: oven-sh/setup-bun@v1
- uses: pnpm/action-setup@v2
with:
version: 7.26.3

- uses: actions/setup-node@v3
with:
node-version: '18'
cache: 'pnpm'

- name: Install
run: bun install
run: pnpm install

- name: Check
run: bun run check
run: pnpm run check

test-format:
name: Выполняем тесты
Expand All @@ -29,70 +36,17 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- uses: oven-sh/setup-bun@v1

- name: Install
run: bun install

- name: Check
run: bun test

build-and-push-image:
name: Собираем dev Docker
runs-on: ubuntu-latest
needs:
- test
- test-format
permissions:
contents: read
packages: write

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Log in to the Container registry
uses: docker/login-action@v3
- uses: pnpm/action-setup@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
version: 7.26.3

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
- uses: actions/setup-node@v3
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
node-version: '18'
cache: 'pnpm'

- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
file: ./deployment/Dockerfile
context: .
push: true
build-args: |
BUILD_MODE=testing
LAUNCH_MODE=development-${{ github.event.pull_request.number }}
APP_VERSION=${{ github.ref_name }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Install
run: pnpm install

deploy-dev:
name: Раскатываем dev среду
runs-on: ubuntu-latest
needs: build-and-push-image
environment:
name: development-pr-${{ github.event.pull_request.number }}
url: https://${{ github.event.repository.name }}__pr-${{ github.event.pull_request.number }}.dev.profcomff.com/
steps:
- name: Deploy
run: |
curl -X 'POST' \
'https://ci.dev.profcomff.com/pr_run' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-H 'Authorization: ${{ secrets.CI_DYAKOVSPACE_MSK_TOKEN }}' \
-d '{
"repo_url": "${{ github.repository }}",
"git_ref": "${{ github.ref }}"
}'
- name: Check
run: pnpm test
2 changes: 1 addition & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ node_modules
pnpm-lock.yaml
.vite
package.json
bun.lockb
bun.lockb

0 comments on commit 6a2cd19

Please sign in to comment.