beaker-docker 1.3.0 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 60d4e4b389614a36d04d058e43e4ff3dccbd4b0902d1848f7131d2185a41f6db
4
- data.tar.gz: 476e807dc221163733a9bb2524c2d5f371d32a884379f16b252825cd5ec44237
3
+ metadata.gz: 03132260cd467ad7af518c89aaddc34d3c089e49d52480ef23ada59e5d36fece
4
+ data.tar.gz: '083787caad790afa68a1b9b9217679ace4fecc4f65d4428d73df275260cb9680'
5
5
  SHA512:
6
- metadata.gz: 0d2b58be378b0837b800cf93fbacdc4ed1ebfb97451c3f0217ef3b9189eda1cdf3938e18706c3d1ccad831b9af2f089d517a77d20e09a91025bf4d07a52f5435
7
- data.tar.gz: '080373c40a10808cd658bf585e2ab34768de2a3efc85e7a90180d694685c92e340c9746eae02674454e6a32b20dd314d66aa705b57e53984f521ee0e9db2470c'
6
+ metadata.gz: 239659877406dea0df91dc8f15b51d4d0380fc40aa5dd91eed939d8ed4fc11e6fe287990645977f622c26d16d356b94de668fa49ac369f1037aa25e4d61993ec
7
+ data.tar.gz: 297b9d6d9a8919873cf97055e9b072f36553f4efcee4e770155374f201fc23505cff52068e860ca0db387478ae1d3c8248ea343a1e47d9fbf626741166b47620
data/.editorconfig ADDED
@@ -0,0 +1,10 @@
1
+ root = true
2
+
3
+ [*]
4
+ charset = utf-8
5
+ end_of_line = lf
6
+ indent_size = 2
7
+ tab_width = 2
8
+ indent_style = space
9
+ insert_final_newline = true
10
+ trim_trailing_whitespace = true
@@ -1,8 +1,17 @@
1
1
  version: 2
2
2
  updates:
3
+ # raise PRs for gem updates
3
4
  - package-ecosystem: bundler
4
5
  directory: "/"
5
6
  schedule:
6
7
  interval: daily
7
8
  time: "13:00"
8
9
  open-pull-requests-limit: 10
10
+
11
+ # Maintain dependencies for GitHub Actions
12
+ - package-ecosystem: github-actions
13
+ directory: "/"
14
+ schedule:
15
+ interval: daily
16
+ time: "13:00"
17
+ open-pull-requests-limit: 10
@@ -10,7 +10,7 @@ jobs:
10
10
  runs-on: ubuntu-latest
11
11
  if: github.repository_owner == 'voxpupuli'
12
12
  steps:
13
- - uses: actions/checkout@v2
13
+ - uses: actions/checkout@v3
14
14
  - name: Install Ruby 3.0
15
15
  uses: ruby/setup-ruby@v1
16
16
  with:
@@ -1,17 +1,31 @@
1
1
  name: Test
2
2
 
3
3
  on:
4
- - pull_request
5
- - push
4
+ pull_request: {}
5
+ push:
6
+ branches:
7
+ - master
6
8
 
7
9
  env:
8
10
  BUNDLE_WITHOUT: release
9
11
 
10
12
  jobs:
13
+ rubocop:
14
+ runs-on: ubuntu-latest
15
+ steps:
16
+ - uses: actions/checkout@v3
17
+ - name: Install Ruby 3.2
18
+ uses: ruby/setup-ruby@v1
19
+ with:
20
+ ruby-version: "3.2"
21
+ bundler-cache: true
22
+ - name: Run Rubocop
23
+ run: bundle exec rake rubocop
24
+
11
25
  rspec:
12
26
  runs-on: ubuntu-latest
13
27
  strategy:
14
- fail-fast: true
28
+ fail-fast: false
15
29
  matrix:
16
30
  include:
17
31
  - ruby: "2.4"
@@ -20,11 +34,13 @@ jobs:
20
34
  - ruby: "2.7"
21
35
  - ruby: "3.0"
22
36
  coverage: "yes"
37
+ - ruby: "3.1"
38
+ - ruby: "3.2"
23
39
  env:
24
40
  COVERAGE: ${{ matrix.coverage }}
25
41
  name: RSpec - Ruby ${{ matrix.ruby }}
26
42
  steps:
27
- - uses: actions/checkout@v2
43
+ - uses: actions/checkout@v3
28
44
  - name: Install Ruby ${{ matrix.ruby }}
29
45
  uses: ruby/setup-ruby@v1
30
46
  with:
@@ -37,63 +53,56 @@ jobs:
37
53
 
38
54
  docker:
39
55
  runs-on: ubuntu-latest
40
- strategy:
41
- fail-fast: true
42
- matrix:
43
- ruby:
44
- - "2.6"
45
- name: Docker - Ruby ${{ matrix.ruby }}
56
+ name: Docker
46
57
  steps:
47
- - uses: actions/checkout@v2
48
- - name: Install Ruby ${{ matrix.ruby }}
58
+ - uses: actions/checkout@v3
59
+ - name: Install Ruby 3.2
49
60
  uses: ruby/setup-ruby@v1
50
61
  with:
51
- ruby-version: ${{ matrix.ruby }}
62
+ ruby-version: "3.2"
52
63
  bundler-cache: true
53
- - name: install bundler
54
- run: |
55
- gem install bundler -v '~> 1.17.3'
56
- bundle update
57
- - name: install container runtime
58
- run: |
59
- sudo apt-get remove -y docker docker-engine docker.io containerd runc ||:
60
- sudo apt-get update -y
61
- sudo apt-get install -y apt-transport-https ca-certificates curl gnupg-agent software-properties-common
62
- curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
63
- sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
64
- sudo apt-get update -y
65
- sudo apt-get install -y docker-ce docker-ce-cli containerd.io
66
- sudo systemctl start docker
67
64
  - name: Run acceptance tests
68
65
  run: bundle exec rake test:acceptance
69
66
 
67
+ beaker_in_container:
68
+ runs-on: ubuntu-latest
69
+ name: Docker - Beaker in container connection test
70
+ steps:
71
+ - uses: actions/checkout@v3
72
+ # use this and not container key from gha to not have a docker network from github
73
+ - name: Run Beaker in docker container
74
+ uses: addnab/docker-run-action@v3
75
+ with:
76
+ image: puppet/puppet-dev-tools:2023-02-24-1bca42e
77
+ options: -v ${{ github.workspace }}:/work
78
+ run: |
79
+ cd /work
80
+ ls -la
81
+ bundle install
82
+ export DOCKER_IN_DOCKER=true
83
+ bundle exec rake test:acceptance
84
+
70
85
  podman:
71
86
  runs-on: ubuntu-latest
72
- strategy:
73
- fail-fast: true
74
- matrix:
75
- ruby:
76
- - "2.6"
77
- name: Podman - Ruby ${{ matrix.ruby }}
87
+ name: Podman
78
88
  steps:
79
- - uses: actions/checkout@v2
80
- - name: Install Ruby ${{ matrix.ruby }}
89
+ - uses: actions/checkout@v3
90
+ - name: Install Ruby 3.2
81
91
  uses: ruby/setup-ruby@v1
82
92
  with:
83
- ruby-version: ${{ matrix.ruby }}
93
+ ruby-version: "3.2"
84
94
  bundler-cache: true
85
- - name: install bundler
86
- run: |
87
- gem install bundler -v '~> 1.17.3'
88
- bundle update
89
- # We need the latest version of podman for this to work
90
- - name: install container runtime
91
- run: |
92
- . /etc/os-release
93
- curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_${VERSION_ID}/Release.key | sudo apt-key add -
94
- echo "deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_${VERSION_ID}/ /" | sudo tee /etc/apt/sources.list.d/podman.list > /dev/null
95
- sudo apt-get update
96
- sudo apt-get -y install podman
97
- sudo systemctl start podman
98
95
  - name: Run acceptance tests
99
96
  run: bundle exec rake test:acceptance
97
+
98
+ tests:
99
+ needs:
100
+ - docker
101
+ - beaker_in_container
102
+ - podman
103
+ - rubocop
104
+ - rspec
105
+ runs-on: ubuntu-latest
106
+ name: Test suite
107
+ steps:
108
+ - run: echo Test suite completed
data/.gitignore CHANGED
@@ -12,6 +12,7 @@ coverage
12
12
  .bundle
13
13
  .vendor
14
14
  _vendor
15
+ vendor
15
16
  tmp/
16
17
  doc
17
18
  # JetBrains IDEA
@@ -23,3 +24,4 @@ doc
23
24
  # Vagrant folder
24
25
  .vagrant/
25
26
  .vagrant_files/
27
+ vendor/bundle
data/.rubocop.yml ADDED
@@ -0,0 +1,48 @@
1
+ # The behavior of RuboCop can be controlled via the .rubocop.yml
2
+ # configuration file. It makes it possible to enable/disable
3
+ # certain cops (checks) and to alter their behavior if they accept
4
+ # any parameters. The file can be placed either in your home
5
+ # directory or in some project directory.
6
+ #
7
+ # RuboCop will start looking for the configuration file in the directory
8
+ # where the inspected file is and continue its way up to the root directory.
9
+ #
10
+ # See https://docs.rubocop.org/rubocop/configuration
11
+ ---
12
+ inherit_from: .rubocop_todo.yml
13
+
14
+ require:
15
+ - rubocop-performance
16
+ - rubocop-rake
17
+ - rubocop-rspec
18
+
19
+ AllCops:
20
+ NewCops: enable
21
+ DisplayCopNames: true
22
+ ExtraDetails: true
23
+ DisplayStyleGuide: true
24
+ TargetRubyVersion: '2.4'
25
+ Exclude:
26
+ - vendor/**/*
27
+
28
+ Metrics:
29
+ Description: Metrics cops are rarely useful
30
+ Enabled: false
31
+
32
+ Style/HashSyntax:
33
+ Description: Disable temporarily (FIXME)
34
+ EnforcedStyle: ruby19
35
+ Enabled: false
36
+
37
+ Naming/FileName:
38
+ Description: Some files violates the snake_case convention
39
+ Exclude:
40
+ - 'lib/beaker-docker.rb'
41
+
42
+ # Style enforcements
43
+ Style/TrailingCommaInArrayLiteral:
44
+ EnforcedStyleForMultiline: consistent_comma
45
+ Style/IfUnlessModifier:
46
+ Enabled: false
47
+ Style/StringLiterals:
48
+ Enabled: false