-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #46 from okurz/feature/tests
Add tidy and compile checks
- Loading branch information
Showing
4 changed files
with
56 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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,14 @@ | ||
--- | ||
name: 'Perl author tests' | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
perl-author-tests: | ||
runs-on: ubuntu-latest | ||
name: Perl author tests | ||
container: | ||
image: registry.opensuse.org/devel/openqa/containers/os-autoinst_dev | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- run: make test-author |
This file contains 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 |
---|---|---|
@@ -1,4 +1,19 @@ | ||
.PHONY: help | ||
help: | ||
@echo Call one of the available targets: | ||
@sed -n 's/\(^[^.#[:space:]A-Z]*\):.*$$/\1/p' Makefile | uniq | ||
|
||
.PHONY: update-deps | ||
update-deps: | ||
tools/update-deps --cpanfile cpanfile | ||
|
||
.PHONY: test | ||
test: test-tidy test-author | ||
|
||
.PHONY: test-tidy | ||
test-tidy: | ||
tools/tidyall --all --check-only | ||
|
||
.PHONY: test-author | ||
test-author: | ||
prove -l -r xt/ |
This file contains 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,7 @@ | ||
#!/usr/bin/perl | ||
# Copyright SUSE LLC | ||
# SPDX-License-Identifier: GPL-2.0-or-later | ||
|
||
use Test::Most; | ||
use Test::Code::TidyAll; | ||
tidyall_ok(); |
This file contains 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,20 @@ | ||
# Copyright SUSE LLC | ||
# SPDX-License-Identifier: GPL-2.0-or-later | ||
|
||
use Test::Most; | ||
# We need :no_end_test here because otherwise it would output a no warnings | ||
# test for each of the modules, but with the same test number | ||
use Test::Warnings qw(:no_end_test :report_warnings); | ||
use FindBin; | ||
use lib "$FindBin::Bin/lib"; | ||
use OpenQA::Test::TimeLimit '400'; | ||
|
||
use Test::Strict; | ||
|
||
push @Test::Strict::MODULES_ENABLING_STRICT, 'Test::Most'; | ||
push @Test::Strict::MODULES_ENABLING_WARNINGS, 'Test::Most'; | ||
|
||
$Test::Strict::TEST_SYNTAX = 1; | ||
$Test::Strict::TEST_STRICT = 1; | ||
$Test::Strict::TEST_WARNINGS = 1; | ||
all_perl_files_ok(qw(lib tools xt)); |