mirror of
https://github.com/pomerium/pomerium.git
synced 2025-08-04 17:29:16 +02:00
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 3.2.0 to 3.3.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](c56af95754...37abcedcc1
)
---
updated-dependencies:
- dependency-name: docker/build-push-action
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Denis Mishin <dmishin@pomerium.com>
266 lines
7.7 KiB
YAML
266 lines
7.7 KiB
YAML
name: Test
|
|
permissions:
|
|
contents: read
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
|
|
jobs:
|
|
test:
|
|
strategy:
|
|
matrix:
|
|
go-version: [1.19.x]
|
|
node-version: [16.x]
|
|
platform: [ubuntu-latest, macos-latest]
|
|
runs-on: ${{ matrix.platform }}
|
|
steps:
|
|
- uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568
|
|
with:
|
|
go-version: ${{ matrix.go-version }}
|
|
|
|
- uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c
|
|
with:
|
|
node-version: ${{ matrix.node-version }}
|
|
|
|
- name: set env vars
|
|
run: echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
|
|
|
|
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: cache go binaries
|
|
uses: actions/cache@58c146cc91c5b9e778e71775dfe9bf1442ad9a12
|
|
id: cache-go-bin
|
|
with:
|
|
path: ~/go/bin
|
|
key: ${{ runner.os }}-${{ hashFiles('**/go.mod') }}
|
|
restore-keys: ${{ runner.os }}-go-bin
|
|
|
|
- uses: actions/cache@58c146cc91c5b9e778e71775dfe9bf1442ad9a12
|
|
with:
|
|
path: |
|
|
~/go/pkg/mod
|
|
~/.cache/go-build
|
|
~/Library/Caches/go-build
|
|
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
|
restore-keys: ${{ runner.os }}-go-
|
|
|
|
- run: make deps-build
|
|
- name: Lint
|
|
if: runner.os == 'Linux'
|
|
run: make lint
|
|
- name: test
|
|
run: make test
|
|
|
|
cover:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
go-version: [1.19.x]
|
|
node-version: [16.x]
|
|
steps:
|
|
- uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568
|
|
with:
|
|
go-version: ${{ matrix.go-version }}
|
|
|
|
- uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c
|
|
with:
|
|
node-version: ${{ matrix.node-version }}
|
|
|
|
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: set env vars
|
|
run: echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
|
|
|
|
- name: cache go binaries
|
|
uses: actions/cache@58c146cc91c5b9e778e71775dfe9bf1442ad9a12
|
|
id: cache-go-bin
|
|
with:
|
|
path: ~/go/bin
|
|
key: ${{ runner.os }}-${{ hashFiles('**/go.mod') }}
|
|
restore-keys: ${{ runner.os }}-go-bin
|
|
|
|
- uses: actions/cache@58c146cc91c5b9e778e71775dfe9bf1442ad9a12
|
|
with:
|
|
path: |
|
|
~/go/pkg/mod
|
|
~/.cache/go-build
|
|
~/Library/Caches/go-build
|
|
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
|
restore-keys: ${{ runner.os }}-go-
|
|
|
|
- name: cover
|
|
run: make cover
|
|
|
|
- uses: jandelgado/gcov2lcov-action@c680c0f7c7442485f1749eb2a13e54a686e76eb5
|
|
name: convert coverage to lcov
|
|
with:
|
|
infile: coverage.txt
|
|
outfile: coverage.lcov
|
|
|
|
- name: upload to coveralls
|
|
uses: coverallsapp/github-action@9ba913c152ae4be1327bfb9085dc806cedb44057
|
|
with:
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
path-to-lcov: coverage.lcov
|
|
|
|
integration:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
go-version: [1.19.x]
|
|
node-version: [16.x]
|
|
platform: [ubuntu-latest]
|
|
deployment: [multi, single]
|
|
runs-on: ${{ matrix.platform }}
|
|
steps:
|
|
- uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568
|
|
with:
|
|
go-version: ${{ matrix.go-version }}
|
|
|
|
- uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c
|
|
with:
|
|
node-version: ${{ matrix.node-version }}
|
|
|
|
- name: set env vars
|
|
run: echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
|
|
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
|
|
with:
|
|
fetch-depth: 0
|
|
- uses: actions/cache@58c146cc91c5b9e778e71775dfe9bf1442ad9a12
|
|
with:
|
|
path: |
|
|
~/go/pkg
|
|
~/.cache/go-build
|
|
~/Library/Caches/go-build
|
|
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-go-
|
|
|
|
- name: build dev docker image
|
|
run: |
|
|
./scripts/build-dev-docker.bash
|
|
|
|
- name: start cluster
|
|
run: |
|
|
export POMERIUM_TAG=dev
|
|
cd ./integration/clusters/${{matrix.deployment}}
|
|
docker-compose up -d
|
|
|
|
- name: integration tests
|
|
run: |
|
|
(cd ./integration/clusters/${{matrix.deployment}} && docker-compose logs -f &)
|
|
go test -v ./integration/...
|
|
|
|
build:
|
|
strategy:
|
|
matrix:
|
|
go-version: [1.19.x]
|
|
node-version: [16.x]
|
|
platform: [ubuntu-latest, macos-latest]
|
|
runs-on: ${{ matrix.platform }}
|
|
steps:
|
|
- uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568
|
|
with:
|
|
go-version: ${{ matrix.go-version }}
|
|
|
|
- uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c
|
|
with:
|
|
node-version: ${{ matrix.node-version }}
|
|
|
|
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
|
|
with:
|
|
fetch-depth: 0
|
|
- uses: actions/cache@58c146cc91c5b9e778e71775dfe9bf1442ad9a12
|
|
with:
|
|
path: |
|
|
~/go/pkg/mod
|
|
~/.cache/go-build
|
|
~/Library/Caches/go-build
|
|
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-go-
|
|
|
|
- name: build
|
|
run: |
|
|
make build-deps
|
|
make build
|
|
|
|
- name: save binary
|
|
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce
|
|
with:
|
|
path: bin/pomerium*
|
|
name: pomerium ${{ github.run_id }} ${{ matrix.platform }}
|
|
retention-days: 1
|
|
|
|
build-docker:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@8c0edbc76e98fa90f69d9a2c020dcb50019dc325
|
|
|
|
- name: Docker Build
|
|
uses: docker/build-push-action@37abcedcc1da61a57767b7588cb9d03eb57e28b3
|
|
with:
|
|
context: .
|
|
file: ./Dockerfile
|
|
push: false
|
|
|
|
precommit:
|
|
runs-on: ubuntu-latest
|
|
if: github.event_name == 'pull_request'
|
|
steps:
|
|
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
|
|
with:
|
|
fetch-depth: 0
|
|
- uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568
|
|
with:
|
|
go-version: 1.19.x
|
|
- uses: actions/setup-python@5ccb29d8773c3f3f653e1705f474dfaa8a06a912
|
|
with:
|
|
python-version: "3.x"
|
|
- uses: pre-commit/action@646c83fcd040023954eafda54b4db0192ce70507
|
|
with:
|
|
extra_args: --show-diff-on-failure --from-ref ${{
|
|
github.event.pull_request.base.sha }} --to-ref ${{
|
|
github.event.pull_request.head.sha }}
|
|
env:
|
|
SKIP: lint
|
|
|
|
license:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
go-version: [1.19.x]
|
|
platform: [ubuntu-latest]
|
|
needs:
|
|
- build
|
|
steps:
|
|
- uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568
|
|
with:
|
|
go-version: 1.19.x
|
|
|
|
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
|
|
|
|
- name: retrieve binary
|
|
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a
|
|
with:
|
|
name: pomerium ${{ github.run_id }} ${{ matrix.platform }}
|
|
path: bin/
|
|
|
|
- name: download envoy
|
|
run: make get-envoy
|
|
|
|
- name: FOSSA Scan
|
|
uses: fossa-contrib/fossa-action@6cffaa064112e1cf9b5798c6224f9487dc1ec316
|
|
with:
|
|
fossa-api-key: 18f4ef488f514d06874b75f5809cea93
|