-
Notifications
You must be signed in to change notification settings - Fork 59
66 lines (61 loc) · 1.73 KB
/
ci.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: GitHub CI
on:
pull_request:
push:
schedule:
- cron: 0 0 * * 0
defaults:
run:
shell: 'bash -Eeuo pipefail -x {0}'
jobs:
build-matrix:
strategy:
matrix:
os: [ ubuntu-latest, windows-2019, windows-2022 ]
name: Build ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: ./ # test our "action.yml" 👀
- name: Smoke Test
run: |
image='https://github.com/docker-library/official-images/raw/master/library/hello-world'
bashbrew list "$image"
bashbrew list --uniq "$image"
bashbrew cat "$image"
bashbrew from --uniq "$image"
"$BASHBREW_SCRIPTS/bashbrew-host-arch.sh" # should print "amd64" or "windows-amd64"
arm32v7="$("$BASHBREW_SCRIPTS/bashbrew-arch-to-goenv.sh" arm32v7)"
eval "$arm32v7"
test "$GOARM" = '7'
go-test:
name: Go Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Go Test
run: |
docker build --pull --file Dockerfile.test --tag test .
docker run --rm test cat coverage.out > coverage.out
- name: Codecov
uses: codecov/codecov-action@v3
with:
files: coverage.out
fail_ci_if_error: true
verbose: true
dockerfile:
name: Test Dockerfile
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build Dockerfile
run: |
docker build --pull .
dockerfile-release:
name: Test Dockerfile.release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build Dockerfile.release
run: |
docker build --pull --file Dockerfile.release .