-
Notifications
You must be signed in to change notification settings - Fork 22
45 lines (39 loc) · 1.09 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
---
name: Test
on:
pull_request:
paths-ignore:
- '**.md'
- 'LICENSE'
- '.github/dependabot.yml'
env:
DOCKER_IMAGE_NAME: gofrolist/molecule
jobs:
build:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3.3.0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2.4.1
- name: Build Docker image
uses: docker/build-push-action@v4.0.0
with:
context: .
load: true
tags: ${{ env.DOCKER_IMAGE_NAME }}:test
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Test Molecule default pipeline
env:
ANSIBLE_FORCE_COLOR: '1'
run: |
docker run \
-v /var/run/docker.sock:/var/run/docker.sock \
${{ env.DOCKER_IMAGE_NAME }}:test \
sh -c "\
molecule --version \
&& molecule init role --driver-name docker gofrolist.validate && cd validate \
&& sed -i 's/gofrolist.//g' molecule/default/converge.yml \
&& molecule test \
"