Skip to content

Commit

Permalink
Merge branch 'hotfix/2.9.5'
Browse files Browse the repository at this point in the history
  • Loading branch information
sergey-s-betke committed Oct 25, 2021
2 parents 955e6e5 + 007d263 commit 0dd61ee
Show file tree
Hide file tree
Showing 7 changed files with 71 additions and 31 deletions.
30 changes: 20 additions & 10 deletions .github/workflows/powershell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,25 @@ name: Check PowerShell code quality
on:
push:
paths:
- "tools/**/*.ps1"
- "tools/**/*.psm1"
- "tools/**/*.psd1"
- .github/workflows/powershell.yml
- .build.ps1
- src/**/*.ps1
- tests/**/*.ps1
- tests/**/*.psd1
- tools/**/*.ps1
- tools/**/*.psm1
- tools/**/*.psd1

pull_request:
paths:
- "tools/**/*.ps1"
- "tools/**/*.psm1"
- "tools/**/*.psd1"
- .github/workflows/powershell.yml
- .build.ps1
- src/**/*.ps1
- tests/**/*.ps1
- tests/**/*.psd1
- tools/**/*.ps1
- tools/**/*.psm1
- tools/**/*.psd1

jobs:
analyze:
Expand All @@ -27,18 +37,18 @@ jobs:
steps:
- uses: actions/checkout@v2.3.5

- name: Run PSScriptAnalyzer
- name: Check tools, build and tests PowerShell scripts quality
uses: microsoft/psscriptanalyzer-action@v1.0
with:
# Check https://github.com/microsoft/psscriptanalyzer-action for more info about the options.
# The below set up runs PSScriptAnalyzer to your entire repository and runs some basic security rules.
includeDefaultRules: true
severity: '"Error", "Warning"'
path: .\tools\
path: .\
ignorePattern: "install"
recurse: true
output: results.sarif

- name: Upload SARIF results file
- name: Upload tools, build and tests PowerShell scripts checking results
uses: github/codeql-action/upload-sarif@v1
with:
sarif_file: results.sarif
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
name: Build and test
name: Tests

on:
push:
paths:
- ".github/workflows/build-and-test.yml"
- "src/**"
- "tools/**"
- ".build.ps1"
- .github/workflows/tests.yml
- src/**
- tools/**
- tests/**
- .build.ps1

pull_request:
paths:
- ".github/workflows/build-and-test.yml"
- "src/**"
- "tools/**"
- ".build.ps1"
- .github/workflows/tests.yml
- src/**
- tools/**
- tests/**
- .build.ps1

jobs:
build:
name: Build
name: Tests
runs-on: windows-latest
steps:
- name: Checkout repository
Expand Down Expand Up @@ -65,11 +67,13 @@ jobs:
Write-Information "Templates version: ${{ steps.gitversion.outputs.semVer }}" -InformationAction Continue;
Invoke-Build -Task Build -Verbose;
- name: Validate .ott and .odt files
shell: powershell
run: |
Import-Module -Name InvokeBuild | Out-Null;
Invoke-Build -Task Test -Verbose;
- name: Validate documents and templates
uses: zyborg/pester-tests-report@v1
with:
include_paths: tests
report_title: Результаты тестирования
tests_fail_step: true
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: Upload .ott files
uses: actions/upload-artifact@v2
Expand Down
3 changes: 2 additions & 1 deletion .vscode/cSpell.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,8 @@
"wagoid",
"xcard",
"xforms",
"xlink"
"xlink",
"zyborg"
],
"ignoreRegExpList": [
"эскалаци(я|и|ю|ей)",
Expand Down
13 changes: 12 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,16 @@

## [Unreleased] Неопубликованные изменения (не вошедшие в релиз)

## [2.9.5]

### Добавлено

- публикация результатов тестирования на GitHub (в комментариях к запуску workflow)

### Изменено

- расширена проверка PowerShell сценариев (сценарии сборки, тестирования)

## [2.9.4]

### Изменено
Expand Down Expand Up @@ -877,7 +887,8 @@
- шаблона переписки, внутренней и внешней (писем,
служебных, докладных и объяснительных записок)

[Unreleased]: https://github.com/test-st-petersburg/DocTemplates/compare/2.9.4...HEAD
[Unreleased]: https://github.com/test-st-petersburg/DocTemplates/compare/2.9.5...HEAD
[2.9.5]: https://github.com/test-st-petersburg/DocTemplates/compare/2.9.4...2.9.5
[2.9.4]: https://github.com/test-st-petersburg/DocTemplates/compare/2.9.3...2.9.4
[2.9.3]: https://github.com/test-st-petersburg/DocTemplates/compare/2.9.2...2.9.3
[2.9.2]: https://github.com/test-st-petersburg/DocTemplates/compare/2.9.1...2.9.2
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Libre Office шаблоны документов

[![GitHub release](https://img.shields.io/github/v/release/test-st-petersburg/DocTemplates.svg?sort=semver&logo=github)](https://github.com/test-st-petersburg/DocTemplates/releases)
[![Build and Test Status](https://github.com/test-st-petersburg/DocTemplates/workflows/Build%20and%20test/badge.svg?branch=master)](https://github.com/test-st-petersburg/DocTemplates/actions/workflows/build-and-test.yml)
[![Build and Test Status](https://github.com/test-st-petersburg/DocTemplates/workflows/Tests/badge.svg?branch=master)](https://github.com/test-st-petersburg/DocTemplates/actions/workflows/tests.yml)

[![Semantic Versioning](https://img.shields.io/static/v1?label=Semantic%20Versioning&message=v2.0.0&color=green&logo=semver)](https://semver.org/lang/ru/spec/v2.0.0.html)
[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-v1.0.0-yellow.svg?logo=git)](https://conventionalcommits.org)
Expand Down
4 changes: 2 additions & 2 deletions security.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

| Version | Supported |
| ------- | ------------------ |
| 2.8.x | :white_check_mark: |
| < 2.8 | :x: |
| 2.9.x | :white_check_mark: |
| < 2.9 | :x: |

## Уведомления об уязвимостях

Expand Down
16 changes: 15 additions & 1 deletion tests/doc/Documents.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,21 @@ Describe 'Open Documents' {

Describe '<Name>' -ForEach @(
$DestinationDocFile | Get-Item |
ForEach-Object { @{ Name = $_.Name; FullName = $_.FullName } }
ForEach-Object {
Push-Location -LiteralPath $DestinationDocumentsPath;
try
{
[System.String] $DocumentRelativePath = ( Resolve-Path -LiteralPath ( $_.FullName ) -Relative );
}
finally
{
Pop-Location;
};
@{
Name = $DocumentRelativePath;
FullName = $_.FullName;
};
}
) {
It 'is valid (by ODFValidator)' -Tag 'ODFValidator' {
# chcp 866 > $null;
Expand Down

0 comments on commit 0dd61ee

Please sign in to comment.