-
Notifications
You must be signed in to change notification settings - Fork 4
Установка ci #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
IT-Medved
wants to merge
5
commits into
bia-technologies:develop
Choose a base branch
from
IT-Medved:feature/ci
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Установка ci #4
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,17 @@ | ||
| name: Извлечение версии | ||
| description: Извлечение версии из исходников | ||
| inputs: | ||
| path: | ||
| description: 'Путь к исходникам' | ||
| required: true | ||
| outputs: | ||
| version: | ||
| description: 'Версия' | ||
| value: ${{ steps.extract_version.outputs.version }} | ||
| runs: | ||
| using: "composite" | ||
| steps: | ||
| - name: Извлечение версии | ||
| shell: bash | ||
| run: echo "version=$(cat ${{ inputs.path }}/Configuration/Configuration.mdo | grep -oP '(?<=<version>)[\d.]+')" >> $GITHUB_OUTPUT | ||
| id: extract_version |
This file contains hidden or 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,18 @@ | ||
| name: Загрузка расширения | ||
| description: Загрузка расширения в информационную базу с использованием ibcmd | ||
| inputs: | ||
| name: | ||
| description: 'Имя загружаемого расширения' | ||
| required: true | ||
| path: | ||
| description: 'Путь к файлу расширения' | ||
| required: true | ||
| runs: | ||
| using: "composite" | ||
| steps: | ||
| - name: Загрузка расширения ${{inputs.name}} | ||
| shell: bash | ||
| run: | | ||
| ibcmd infobase config load --db-path=file-db --extension=${{inputs.name}} --force ${{inputs.path}} | ||
| ibcmd infobase config apply --db-path=file-db --extension=${{inputs.name}} --force | ||
| ibcmd infobase config extension update --db-path=file-db --name=${{inputs.name}} --safe-mode=no --unsafe-action-protection=no |
This file contains hidden or 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,67 @@ | ||
| name: Тестирование | ||
| on: | ||
| push: | ||
| branches: | ||
| - feature/** | ||
| - develop | ||
| paths: | ||
| - '.github/workflows/**' | ||
| - 'exts/**' | ||
| - 'tests/**' | ||
| - 'fixtures/**' | ||
|
|
||
| pull_request_target: | ||
| branches: [ develop ] | ||
| paths: | ||
| - '.github/workflows/**' | ||
| - 'exts/**' | ||
| - 'tests/**' | ||
| - 'fixtures/**' | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.event.number }}-main | ||
| cancel-in-progress: true | ||
|
|
||
| permissions: | ||
| contents: write | ||
| checks: write | ||
| id-token: write | ||
|
|
||
| jobs: | ||
| export_to_designer: | ||
| name: Конвертация исходников | ||
| uses: ./.github/workflows/step-export-xml.yml | ||
| with: | ||
| edt_version: 2023.1.2 | ||
| artifact_name: designer-src | ||
| secrets: inherit | ||
|
|
||
| build_artifacts: | ||
| name: Сборка | ||
| uses: ./.github/workflows/step-build-artifacts-windows.yml | ||
| needs: export_to_designer | ||
| with: | ||
| v8_version: 8.3.21.1895 | ||
| secrets: inherit | ||
|
|
||
| tests: | ||
| name: Тест | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| version: | ||
| - 8.3.21.1895 | ||
| locale: | ||
| - ru_RU | ||
| - en_US | ||
| os: | ||
| - windows-latest | ||
| - ubuntu-22.04 | ||
|
|
||
| uses: ./.github/workflows/step-run-tests.yml | ||
| needs: build_artifacts | ||
| with: | ||
| v8_version: ${{ matrix.version }} | ||
| locale: ${{ matrix.locale }} | ||
| os: ${{ matrix.os }} | ||
| secrets: inherit | ||
This file contains hidden or 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,85 @@ | ||
| name: Сборка артефактов | ||
| on: | ||
| workflow_call: | ||
| inputs: | ||
| v8_version: | ||
| type: string | ||
| required: true | ||
|
|
||
| src_artifact_name: | ||
| type: string | ||
| required: false | ||
| default: designer-src | ||
|
|
||
| artifact_name: | ||
| type: string | ||
| required: false | ||
| default: build-artifacts | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.event.number }}-build | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| build: | ||
| name: Сборка | ||
| runs-on: windows-latest | ||
| defaults: | ||
| run: | ||
| shell: pwsh | ||
| steps: | ||
|
|
||
| - name: Установка 1С:Предприятие | ||
| uses: 1CDevFlow/onec-setup-action@main | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. я соглашусь с замечаниями кролика, лучше использовать явную версию |
||
| with: | ||
| type: onec | ||
| onec_version: ${{ inputs.v8_version }} | ||
| cache: true | ||
| env: | ||
| ONEC_USERNAME: ${{ secrets.ONEC_USERNAME }} | ||
| ONEC_PASSWORD: ${{ secrets.ONEC_PASSWORD }} | ||
| timeout-minutes: 10 | ||
|
|
||
| - name: Загрузка исходников в формате конфигуратора | ||
| uses: actions/download-artifact@v4 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. экшен с депендаботом нужно подключить, для обновления зависимостей GA |
||
| with: | ||
| name: ${{ inputs.src_artifact_name }} | ||
|
|
||
| - name: Распаковка исходников | ||
| run: | | ||
| mkdir export | ||
| mkdir binary | ||
| cd export | ||
| 7z x ../export.7z -y | ||
|
|
||
| - name: Создание информационной базы | ||
| run: ibcmd infobase create --db-path=file-db --import=export\configuration --apply --force | ||
| timeout-minutes: 5 | ||
|
|
||
| - name: Импорт rat из исходников | ||
| run: ibcmd infobase config import --db-path=file-db --extension=RAT export\rat | ||
| timeout-minutes: 5 | ||
|
|
||
| - name: Импорт тестов из исходников | ||
| run: ibcmd infobase config import --db-path=file-db --extension=tests export\tests | ||
| timeout-minutes: 5 | ||
|
|
||
| - name: Сохрание расширения rat | ||
| run: ibcmd infobase config save --db-path=file-db --extension=RAT binary\rat.cfe | ||
| timeout-minutes: 5 | ||
|
|
||
| - name: Сохрание расширения с тестами | ||
| run: ibcmd infobase config save --db-path=file-db --extension=tests binary\tests.cfe | ||
| timeout-minutes: 5 | ||
|
|
||
| - name: Сохрание тестовой конфигурации | ||
| run: ibcmd infobase config save --db-path=file-db binary\configuration.cf | ||
| timeout-minutes: 5 | ||
|
|
||
| - name: Публикация артефактов | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: ${{ inputs.artifact_name }} | ||
| path: binary\*.* | ||
| if-no-files-found: error | ||
| retention-days: 1 | ||
This file contains hidden or 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,99 @@ | ||
| name: Конвертация исходников в формат конфигуратора | ||
| on: | ||
| workflow_call: | ||
| inputs: | ||
| edt_version: | ||
| type: string | ||
| required: true | ||
|
|
||
| artifact_name: | ||
| type: string | ||
| required: true | ||
|
|
||
| engine_only: | ||
| type: boolean | ||
| required: false | ||
| default: false | ||
| outputs: | ||
| rat_version: | ||
| value: ${{ jobs.export.outputs.rat_version }} | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.event.number }}-export | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| export: | ||
| name: Конвертация | ||
| runs-on: ubuntu-22.04 | ||
| outputs: | ||
| rat_version: ${{ steps.extract_version.outputs.version }} | ||
|
|
||
| steps: | ||
| - name: Извлечение исходников PR | ||
| if: github.event_name == 'pull_request_target' || github.event_name == 'pull_request' | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| ref: refs/pull/${{ github.event.number }}/merge # Для поддержки pull_request и pull_request_target | ||
|
|
||
| - name: Извлечение исходников ветки ${{ github.ref_name }} | ||
| if: github.event_name == 'push' | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Извлечение версии rat | ||
| uses: ./.github/actions/extract-version | ||
| with: | ||
| path: ./exts/rat/src | ||
| id: extract_version | ||
|
|
||
| - name: Установка 1C:EDT | ||
| uses: 1CDevFlow/onec-setup-action@main | ||
| with: | ||
| type: edt | ||
| edt_version: ${{ inputs.edt_version }} | ||
| cache: true | ||
| env: | ||
| ONEC_USERNAME: ${{ secrets.ONEC_USERNAME }} | ||
| ONEC_PASSWORD: ${{ secrets.ONEC_PASSWORD }} | ||
| timeout-minutes: 30 | ||
|
|
||
| - name: Ковертация исходников конфигурации | ||
| if: ${{ !inputs.engine_only }} | ||
| uses: alkoleft/onec-edtcli-command-action@main | ||
| with: | ||
| export: true | ||
| from: fixtures/configuration | ||
| to: export/configuration | ||
| timeout: 15 | ||
| timeout-minutes: 15 | ||
|
|
||
| - name: Ковертация исходников тестов | ||
| uses: alkoleft/onec-edtcli-command-action@main | ||
| with: | ||
| export: true | ||
| from: exts/rat | ||
| to: export/rat | ||
| timeout: 15 | ||
| timeout-minutes: 15 | ||
|
|
||
| - name: Ковертация исходников тестов | ||
| uses: alkoleft/onec-edtcli-command-action@main | ||
| with: | ||
| export: true | ||
| from: tests | ||
| to: export/tests | ||
| timeout: 15 | ||
| timeout-minutes: 15 | ||
|
|
||
| - name: Упаковка исходников в архив | ||
| run: | | ||
| cd export | ||
| 7za a -t7z ../export.7z ./ | ||
|
|
||
| - name: Публикация исходников в формате конфигуратора | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: ${{ inputs.artifact_name }} | ||
| path: export.7z | ||
| if-no-files-found: error | ||
| retention-days: 1 |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
нужно 2024 актуальную взять
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Помнится были какие-то проблемы с новой версией в gh actions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
надо на edt cli переписать c ring