Skip to content

Commit 56201a1

Browse files
Merge pull request #151 from MonolithProjects/feat/improve_ci_tests
Feat/improve ci tests
2 parents b3ac7f2 + 084563a commit 56201a1

File tree

8 files changed

+34
-47
lines changed

8 files changed

+34
-47
lines changed

.github/CONTRIBUTING.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ Click on `fork` on the top-right corner and fork the repository.
1818
## 3. Install pre-commit
1919

2020
Install [Pre-commit](https://pre-commit.com/#install) software
21+
2122
## 4. Make the changes
2223

2324
Do the changes in your own GitHub namespace.
@@ -38,6 +39,6 @@ molecule test
3839
3940
## 6. Create a pull request
4041

41-
Please create a pull request into the `master` branch. Here is [how to do it](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork).
42+
Please create a pull request into the `develop` branch. Here is [how to do it](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork).
4243

4344
Please consider to [sponsor](https://github.com/sponsors/monolithprojects) me :-)

.github/workflows/main.yml .github/workflows/tests.yml

+9-7
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
name: molecule test
22

33
on:
4-
pull_request_review:
5-
types:
6-
- submitted
74
pull_request:
85
types:
9-
- assigned
6+
- opened
7+
- reopened
8+
branches:
9+
- 'master'
10+
- 'develop'
11+
- 'feature/**'
1012
schedule:
1113
- cron: '0 6 * * 0'
1214
workflow_dispatch:
@@ -16,7 +18,7 @@ jobs:
1618
name: Test Repo Runner
1719
environment:
1820
name: test
19-
runs-on: ubuntu-18.04
21+
runs-on: ubuntu-22.04
2022
strategy:
2123
fail-fast: false
2224
matrix:
@@ -27,7 +29,7 @@ jobs:
2729
tag: "latest"
2830
- os: "debian11"
2931
tag: "latest"
30-
- os: "fedora35"
32+
- os: "fedora37"
3133
tag: "latest"
3234
- os: "ubuntu20"
3335
tag: "latest"
@@ -54,7 +56,7 @@ jobs:
5456
name: Test Org Runner
5557
environment:
5658
name: test
57-
runs-on: ubuntu-18.04
59+
runs-on: ubuntu-22.04
5860
strategy:
5961
fail-fast: false
6062
steps:

README.md

+2-6
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ Personal Access Token for GitHub account can be created [here](https://github.co
3838
## Tested on:
3939

4040
* Debian 9,10,11
41-
* Fedora 35
41+
* Fedora 37
4242
* Rocky Linux 8
43-
* Ubuntu 18,20
43+
* Ubuntu 20,22
4444

4545
**Note:** Fedora 32+ and Ubuntu 20 must use Ansible 2.9.8+. Other distros/releases will work also with older 2.8.0+ Ansible.
4646

@@ -96,10 +96,6 @@ runner_extra_config_args: ""
9696
# Name to assign to this runner in GitHub (System hostname as default)
9797
runner_name: "{{ ansible_hostname }}"
9898

99-
# Custom service name when using Github Enterprise server
100-
# DEPRECATED: this variable is deprecated in favor of "runner_on_ghes" and will be removed in release 1.15.
101-
# service_name: actions.runner._services.{{ runner_name }}.service
102-
10399
# GitHub Repository user or Organization owner used for Runner registration
104100
# github_account: "youruser"
105101

molecule/custom_env/molecule.yml

+4-7
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,11 @@ driver:
1818
platforms:
1919
- name: "${os:-ubuntu20}-${tag:-latest}"
2020
image: "${namespace:-monolithprojects}/systemd-${os:-ubuntu20}:${tag:-latest}"
21-
command: /sbin/init
22-
tmpfs:
23-
- /run
24-
- /tmp
2521
volumes:
26-
- /sys/fs/cgroup:/sys/fs/cgroup:ro
27-
privileged: yes
28-
pre_build_image: yes
22+
- "/sys/fs/cgroup:/sys/fs/cgroup:${MOLECULE_DOCKER_VOLUMES:-ro}" # Use "ro" for cgroup v1 and "rw" for cgroup v2
23+
cgroupns_mode: ${MOLECULE_DOCKER_CGROUPS_MODE:-"private"} # Use "private" for cgroup v1 and "host" for cgroup v2
24+
privileged: true
25+
pre_build_image: true
2926
verifier:
3027
name: ansible
3128
scenario:

molecule/default/converge.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
- runner_user: ansible
99
- github_repo: ansible-github_actions_runner-testrepo
1010
- github_account: monolithprojects-testorg
11-
- runner_version: latest
11+
- runner_version: "latest"
1212
- runner_name: test_name
1313
- runner_on_ghes: yes
1414
- reinstall_runner: false

molecule/default/molecule.yml

+4-7
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,11 @@ driver:
1818
platforms:
1919
- name: "${os:-ubuntu20}-${tag:-latest}"
2020
image: "${namespace:-monolithprojects}/systemd-${os:-ubuntu20}:${tag:-latest}"
21-
command: /sbin/init
22-
tmpfs:
23-
- /run
24-
- /tmp
2521
volumes:
26-
- /sys/fs/cgroup:/sys/fs/cgroup:ro
27-
privileged: yes
28-
pre_build_image: yes
22+
- "/sys/fs/cgroup:/sys/fs/cgroup:${MOLECULE_DOCKER_VOLUMES:-ro}" # Use "ro" for cgroup v1 and "rw" for cgroup v2
23+
cgroupns_mode: ${MOLECULE_DOCKER_CGROUPS_MODE:-"private"} # Use "private" for cgroup v1 and "host" for cgroup v2
24+
privileged: true
25+
pre_build_image: true
2926
verifier:
3027
name: ansible
3128
scenario:

molecule/org/molecule.yml

+6-9
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,13 @@ lint: |
1313
driver:
1414
name: docker
1515
platforms:
16-
- name: "${os:-ubuntu16}-${tag:-latest}"
17-
image: "${namespace:-monolithprojects}/systemd-${os:-ubuntu16}:${tag:-latest}"
18-
command: /sbin/init
19-
tmpfs:
20-
- /run
21-
- /tmp
16+
- name: "${os:-ubuntu20}-${tag:-latest}"
17+
image: "${namespace:-monolithprojects}/systemd-${os:-ubuntu20}:${tag:-latest}"
2218
volumes:
23-
- /sys/fs/cgroup:/sys/fs/cgroup:ro
24-
privileged: yes
25-
pre_build_image: yes
19+
- "/sys/fs/cgroup:/sys/fs/cgroup:${MOLECULE_DOCKER_VOLUMES:-ro}" # Use "ro" for cgroup v1 and "rw" for cgroup v2
20+
cgroupns_mode: ${MOLECULE_DOCKER_CGROUPS_MODE:-"private"} # Use "private" for cgroup v1 and "host" for cgroup v2
21+
privileged: true
22+
pre_build_image: true
2623
verifier:
2724
name: ansible
2825
scenario:

molecule/repo/molecule.yml

+6-9
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,13 @@ lint: |
1313
driver:
1414
name: docker
1515
platforms:
16-
- name: "${os:-ubuntu16}-${tag:-latest}"
17-
image: "${namespace:-monolithprojects}/systemd-${os:-ubuntu16}:${tag:-latest}"
18-
command: /sbin/init
19-
tmpfs:
20-
- /run
21-
- /tmp
16+
- name: "${os:-ubuntu20}-${tag:-latest}"
17+
image: "${namespace:-monolithprojects}/systemd-${os:-ubuntu20}:${tag:-latest}"
2218
volumes:
23-
- /sys/fs/cgroup:/sys/fs/cgroup:ro
24-
privileged: yes
25-
pre_build_image: yes
19+
- "/sys/fs/cgroup:/sys/fs/cgroup:${MOLECULE_DOCKER_VOLUMES:-ro}" # Use "ro" for cgroup v1 and "rw" for cgroup v2
20+
cgroupns_mode: ${MOLECULE_DOCKER_CGROUPS_MODE:-"private"} # Use "private" for cgroup v1 and "host" for cgroup v2
21+
privileged: true
22+
pre_build_image: true
2623
verifier:
2724
name: ansible
2825
scenario:

0 commit comments

Comments
 (0)