forked from platzi/git-github
-
Notifications
You must be signed in to change notification settings - Fork 0
31 lines (26 loc) · 731 Bytes
/
testing.yml
File metadata and controls
31 lines (26 loc) · 731 Bytes
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
name: Docker Test
on:
push:
branches:
- main
jobs:
docker-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Run Docker container
run: |
docker run -d --name testcontainer alpine tail -f /dev/null
- name: Run tests
run: |
docker exec testcontainer /bin/sh -c "
echo 'Ejecutando pruebas...';
cd home
mkdir amin
cd amin
printf 'Este es el contenido del archivo.\nPuede incluir varias líneas.\n' > ejemplo.txt
ls -a || exit 1
"