-
Notifications
You must be signed in to change notification settings - Fork 0
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
First implementation #1
base: master
Are you sure you want to change the base?
Conversation
Testplane run finisnedTestplane HTML-report is available at https://gemini-testing.github.io/gh-actions-testplane/testplane-reports/2025-01-27/12980623276/36 |
a3354f1
to
a32aff2
Compare
6a5bc27
to
a32aff2
Compare
@@ -0,0 +1,41 @@ | |||
name: GitHub action publish new version |
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.
Флоу для релиза новой версии github action
Собирает новую версию action и коммитит ее в мастер
@@ -0,0 +1,65 @@ | |||
name: Testplane CI |
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.
Тестовый флоу.
- Тестирует юнит тестами
- Прогоняет линтер
- Билдит action
- Запускает этот action на тестовом проекте
- Выкладывает html-отчет на gh-pages
- Оставляет комментарий со ссылкой на отчет
@@ -1 +1,2 @@ | |||
node_modules | |||
dist/dev.js |
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.
Собирается с npm run build
, запускается разработчиком
На самом деле, локально билдить какого-то смысла нет, кроме как "проверить, что оно собирается"
@@ -0,0 +1 @@ | |||
v20.18.1 |
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.
Максимальная версия, поддерживаемая github actions
@@ -0,0 +1,43 @@ | |||
name: 'Testplane action' |
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.
Конфиг github action
Описывает входные и выходные параметры
return; | ||
} | ||
|
||
if (this.needsBrowsersCache && !cache.isFeatureAvailable()) { |
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 сервис кэширования может быть недоступен
|
||
core.debug(`Testplane browsers cache primary key: "${this.cachePrimaryKey}"`); | ||
|
||
this.init = () => Promise.resolve(); |
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.
Второй раз init
не нужен
const commandOutput = await this.pm.getExecOutput(this.withConfig(["testplane", "--version"])); | ||
const semverNumbers = commandOutput.split(".").map(Number) as [MajorVersion, MinorVersion, PatchVersion]; | ||
|
||
this.version = () => Promise.resolve(semverNumbers); |
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.
Результаты подобных команд не изменяются в процессе работы action, так что их кэшируем
|
||
core.debug("Running Testplane install-deps"); | ||
|
||
await this.pm.exec(this.withConfig(["testplane", "install-deps"]), { silent: false }); |
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.
silent: false
включает вывод логов команды в stdout/stderr
const dateNow = new Date(); | ||
|
||
const year = dateNow.getUTCFullYear(); | ||
const month = String(dateNow.getUTCMonth() + 1).padStart(2, "0"); |
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.
По умолчанию getUTCMonth
выдает значения [0, 11]
45a2e7d
to
431cf70
Compare
431cf70
to
8939450
Compare
No description provided.