-
Notifications
You must be signed in to change notification settings - Fork 6
34 lines (33 loc) · 1.16 KB
/
main.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
name: BuildTest
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
docker-build-test-ubuntu:
runs-on: ubuntu-latest
name: BuildTestUbuntu
env:
PRCOMMITSHA : ${{ github.event.pull_request.head.sha }}
PRREPOSITORY: ${{ github.event.pull_request.head.repo.full_name }}
steps:
# First check out the repository to get the docker file
- name: Checkout
uses: actions/checkout@v2
# Print the context for this GitHub workflow
- name: PrintGithubContext
run: echo ${PRCOMMITSHA:-$GITHUB_SHA} ${PRREPOSITORY:-$GITHUB_REPOSITORY}
# Now build in a container with all deps
- name: DockerBuildTest
run: |
docker build -t ci-platypus-ubuntu \
--build-arg build_git_sha=${PRCOMMITSHA:-$GITHUB_SHA} \
--build-arg build_git_repo=${PRREPOSITORY:-$GITHUB_REPOSITORY} \
docker/platypus
- name: UploadCoverage
run: |
ci_env=`bash <(curl -s https://codecov.io/env)`
docker run $ci_env -e CI=true ci-platypus-ubuntu:latest bash opt/platypus/upload-coverage.sh