Skip to content

Commit

Permalink
Merge pull request #5434 from perlpunk/subrepo-update
Browse files Browse the repository at this point in the history
Update os-autoinst-common and yaml files
  • Loading branch information
perlpunk authored Jan 23, 2024
2 parents 1e9bfef + 968a075 commit bd8ad6e
Show file tree
Hide file tree
Showing 30 changed files with 535 additions and 415 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/javascript.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ jobs:
node-version: [16.x]
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v1
- name: Use Node ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: npm install
run: npm i
- name: npm run lint
run: npm run lint
- uses: actions/checkout@v1
- name: Use Node ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: npm install
run: npm i
- name: npm run lint
run: npm run lint
44 changes: 22 additions & 22 deletions .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,35 @@ pull_request_rules:
- name: automatic merge
conditions:
- and: &base_checks
- base=master
- -label~=^acceptance-tests-needed|not-ready
# wait explicitly for one of the final checks to show up to be on the
# safe side even in case of checks not reporting back at all
- "status-success=codecov/project"
- "status-success=codecov/patch"
# Multibuild results will not report the "pending" status:
# https://openbuildservice.org/help/manuals/obs-user-guide/cha.obs.scm_ci_workflow_integration.html#sec.obs.obs_scm_ci_workflow_integration.setup.status_reporting
# "unresolvable" is not reported in general:
# https://trello.com/c/0N3jHq5M/2257-report-back-to-scm-when-build-results-arent-failed-and-succeeded
# So we need to require the number of tests explicitly:
- "#check-success>=35"
- "status-success=static-check-containers"
- "status-success=webui-docker-compose"
- "#check-failure=0"
- "#check-pending=0"
- linear-history
- base=master
- -label~=^acceptance-tests-needed|not-ready
# wait explicitly for one of the final checks to show up to be on the
# safe side even in case of checks not reporting back at all
- status-success=codecov/project
- status-success=codecov/patch
# Multibuild results will not report the "pending" status:
# https://openbuildservice.org/help/manuals/obs-user-guide/cha.obs.scm_ci_workflow_integration.html#sec.obs.obs_scm_ci_workflow_integration.setup.status_reporting
# "unresolvable" is not reported in general:
# https://trello.com/c/0N3jHq5M/2257-report-back-to-scm-when-build-results-arent-failed-and-succeeded
# So we need to require the number of tests explicitly:
- "#check-success>=35"
- status-success=static-check-containers
- status-success=webui-docker-compose
- "#check-failure=0"
- "#check-pending=0"
- linear-history
- and:
- "#approved-reviews-by>=2"
- "#changes-requested-reviews-by=0"
# https://doc.mergify.io/examples.html#require-all-requested-reviews-to-be-approved
- "#review-requested=0"
- "#approved-reviews-by>=2"
- "#changes-requested-reviews-by=0"
# https://doc.mergify.io/examples.html#require-all-requested-reviews-to-be-approved
- "#review-requested=0"
actions: &merge
merge:
method: merge
- name: automatic merge on special label
conditions:
- and: *base_checks
- "label=merge-fast"
- label=merge-fast
actions: *merge
- name: automatic merge for dependency bot updates
conditions:
Expand Down
54 changes: 27 additions & 27 deletions .obs/workflows.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
---
pr:
steps:
- branch_package:
source_project: devel:openQA
source_package: openQA
target_project: devel:openQA:GitHub
add_repositories: disabled
- configure_repositories:
project: devel:openQA:GitHub
repositories:
- name: openSUSE_Tumbleweed
paths:
- target_project: openSUSE:Factory
target_repository: snapshot
- target_project: devel:openQA
target_repository: openSUSE_Tumbleweed
architectures: [ x86_64 ]
- name: openSUSE_Leap_15.5
paths:
- target_project: devel:openQA:Leap:15.5
target_repository: openSUSE_Leap_15.5
- target_project: devel:openQA
target_repository: openSUSE_Leap_15.5
architectures: [ x86_64 ]
- name: SLE_15_SP6_Backports
paths:
- target_project: openSUSE:Backports:SLE-15-SP6:Update
target_repository: standard
architectures: [ x86_64 ]
- branch_package:
source_project: devel:openQA
source_package: openQA
target_project: devel:openQA:GitHub
add_repositories: disabled
- configure_repositories:
project: devel:openQA:GitHub
repositories:
- name: openSUSE_Tumbleweed
paths:
- target_project: openSUSE:Factory
target_repository: snapshot
- target_project: devel:openQA
target_repository: openSUSE_Tumbleweed
architectures: [ x86_64 ]
- name: openSUSE_Leap_15.5
paths:
- target_project: devel:openQA:Leap:15.5
target_repository: openSUSE_Leap_15.5
- target_project: devel:openQA
target_repository: openSUSE_Leap_15.5
architectures: [ x86_64 ]
- name: SLE_15_SP6_Backports
paths:
- target_project: openSUSE:Backports:SLE-15-SP6:Update
target_repository: standard
architectures: [ x86_64 ]
filters:
event: pull_request

Expand Down
21 changes: 16 additions & 5 deletions .yamllint
Original file line number Diff line number Diff line change
@@ -1,22 +1,33 @@
extends: default
ignore: |
t/data/job-templates/invalid-yaml-schema.yaml
t/data/job-templates/duplicate-key.yaml
t/data/08-opensuse-test.yaml
t/data/08-opensuse.yaml
container/helm/**
dbicdh
node_modules


rules:
line-length:
max: 160
document-start: disable
indentation:
indent-sequences: whatever
indent-sequences: true
spaces: 2

# Allows aligning subsequent lines with [] sequences
brackets:
min-spaces-inside: 0
max-spaces-inside: -1
commas:
max-spaces-after: -1

# Allows aligning key value pairs
colons:
max-spaces-after: -1

ignore: |
t/data/job-templates/invalid-yaml-schema.yaml
t/data/job-templates/duplicate-key.yaml
container/helm/**
truthy:
allowed-values: ['true', 'false']
check-keys: false
8 changes: 8 additions & 0 deletions .yamltidy
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
v: v0.1
indentation:
spaces: 2
block-sequence-in-mapping: 2
trailing-spaces: fix
scalar-style:
default: plain
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
name: 'Commit message check'

# yamllint disable-line rule:truthy
on:
workflow_call:
secrets:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
name: 'Commit message check'

# yamllint disable-line rule:truthy
on:
pull_request:
push:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
name: 'Perl critic'

# yamllint disable-line rule:truthy
on:
pull_request:
push:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
name: 'Perl static checks'

# yamllint disable-line rule:truthy
on:
pull_request:
push:
Expand Down
19 changes: 19 additions & 0 deletions external/os-autoinst-common/.github/workflows/yamllint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: 'YAML-lint'

on:
pull_request:
push:
branches:
- 'master'

jobs:
yaml-lint:
runs-on: ubuntu-latest
name: "YAML-lint"
steps:
- uses: actions/checkout@v4
- uses: docker://registry.opensuse.org/home/okurz/container/containers/tumbleweed:yamllint
with:
entrypoint: yamllint
args: -c .yamllint --strict ./ --format github
4 changes: 2 additions & 2 deletions external/os-autoinst-common/.gitrepo
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
[subrepo]
remote = [email protected]:os-autoinst/os-autoinst-common.git
branch = master
commit = 3d6106cb21f6320edc144297546cda0aaa155f01
parent = 98e54f9632959aed6a15e3d0afe0a9bdb6249bd4
commit = a94b58b23be8ddb5bf85a7b1f87914ba9e71b9e6
parent = 1e9bfef6f182ff6e30268174f6414bf48c35b89c
method = merge
cmdver = 0.4.6
2 changes: 1 addition & 1 deletion external/os-autoinst-common/.perlcriticrc
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ severity = 5

# -- Superfluous use strict/warning.
[RedundantStrictWarning]
equivalent_modules = Test::Most
equivalent_modules = Test::Most
Empty file.
25 changes: 25 additions & 0 deletions external/os-autoinst-common/.yamllint
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
extends: default
ignore-from-file: [.gitignore, .yamlignore]

rules:
line-length:
max: 160
document-start: disable
indentation:
indent-sequences: true
spaces: 2

# Allows aligning subsequent lines with [] sequences
brackets:
min-spaces-inside: 0
max-spaces-inside: -1
commas:
max-spaces-after: -1

# Allows aligning key value pairs
colons:
max-spaces-after: -1

truthy:
allowed-values: ['true', 'false']
check-keys: false
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Copyright SUSE LLC
# SPDX-License-Identifier: GPL-2.0-or-later

package Perl::Critic::Policy::SpaceAfterSubroutineName;

use strict;
use warnings;
use version 0.77;
use experimental 'signatures';

use base 'Perl::Critic::Policy::Subroutines::ProhibitSubroutinePrototypes';

use Perl::Critic::Utils qw{ :severities };

our $VERSION = '0.0.1';

my $DESC = q{Inconsistent sub declaration};
my $EXPL = q{Sub '%s' must have only one space surrounding name, parenthesis and/or block body.};

sub default_themes { qw(openqa) }
sub default_severity { $SEVERITY_HIGHEST }
sub supported_parameters { () }
sub applies_to { 'PPI::Statement::Sub' }

# check that use strict/warnings is not present when equivalent modules are.
sub violates ($self, $elem, $doc) {
# Grep the first 7 tokens:
# Case 1: bare sub
# 0. literal "sub"
# 1. :space: # must be 1
# 2. sub_name
# 3. :space: # must be 1
# 4. block/structure
# Case 2: sub with prototype/signature
# 0. literal "sub"
# 1. :space: # must be 1
# 2. sub_name
# 3. :space: # must be 1
# 4. prototype
# 5. :space: # must be 1
# 6. block/structure

my @tokens = ($elem->tokens())[0 .. 6];
return $self->violation($DESC, sprintf($EXPL, $elem->name), $elem) unless _is_surrounded_by_one_space($tokens[2]);

return () if $tokens[4]->isa('PPI::Token::Structure');

return $self->violation($DESC, sprintf($EXPL, $elem->name), $elem) unless _is_surrounded_by_one_space($tokens[4]);

return ();
}

sub _is_only_one_space ($token) {
return $token->isa('PPI::Token::Whitespace') && $token->content eq ' ';
}

sub _is_surrounded_by_one_space ($token) {
return _is_only_one_space($token->previous_sibling) && _is_only_one_space($token->next_sibling);
}

1;
4 changes: 2 additions & 2 deletions external/os-autoinst-common/tools/tidyall
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ use Perl::Tidy;
use Module::CPANfile;
use FindBin '$Bin';

=item perltidy_version
=item perltidy_version ()
Grabs the perltidy version from cpanfile using Module::CPANfile.
=cut

sub perltidy_version {
sub perltidy_version () {
my $cpanfile_location;
# Try searching for a cpanfile in:
# - the current working directory
Expand Down
Loading

0 comments on commit bd8ad6e

Please sign in to comment.