generated from actions/container-action
-
Notifications
You must be signed in to change notification settings - Fork 4
50 lines (49 loc) · 1.82 KB
/
python-demo.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
46
47
48
49
50
name: Docker-based CI
on:
push:
branches:
- master # forall push/merge in master
pull_request:
branches:
- "**" # forall submitted Pull Requests
jobs:
# ######################################################################
# This job illustrates the fact that docker-coq-action is "coq-agnostic"
# and can be used with any Docker image.
#
# The two fields that are required to address this use case are:
# https://github.com/coq-community/docker-coq-action#custom_image
# https://github.com/coq-community/docker-coq-action#custom_script
# ######################################################################
python-demo:
name: custom_image / python:3
runs-on: ubuntu-latest
steps:
################################################################
# Begin GHA_TEST_ENV # You should remove this GHA_TEST_ENV block
# # if you copy this demo workflow elsewhere!
- uses: actions/checkout@v2
with:
repository: 'erikmd/poc-github-ci'
ref: 'master'
- uses: actions/checkout@v2
with:
path: 'docker-coq-action'
- uses: './docker-coq-action'
# End GHA_TEST_ENV
##################
# - uses: actions/checkout@v2
# - uses: coq-community/docker-coq-action@v1
with:
custom_image: 'python:3'
custom_script: |
python --version
startGroup "Install dependencies"
pip install --no-cache-dir --upgrade pip
pip install --no-cache-dir -r requirements.txt
endGroup
startGroup "Run tests"
pytest *.py
endGroup
# in case there is a permission mismatch issue at GHA cleanup time,
# see https://github.com/coq-community/docker-coq-action#permissions