-
Notifications
You must be signed in to change notification settings - Fork 23
44 lines (38 loc) · 1.05 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
---
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@v4.2.0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3.6.1
- name: Build Docker image
uses: docker/build-push-action@v6.7.0
with:
context: .
file: Dockerfile
load: true
tags: ${{ env.DOCKER_IMAGE_NAME }}:test
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Test Molecule default pipeline
run: |
docker run \
-v /var/run/docker.sock:/var/run/docker.sock \
-e PY_COLORS=1 \
${{ env.DOCKER_IMAGE_NAME }}:test \
sh -c "\
molecule --version \
&& molecule init scenario --driver-name docker validate \
&& molecule test --scenario-name validate --driver-name docker \
"