blob: ef2ecb2d0a80e2456b53c7f2921671dcd4421786 [file] [log] [blame]
name: tests
on:
push:
branches:
- master
paths-ignore:
- '**.md'
pull_request:
paths-ignore:
- '**.md'
jobs:
test:
runs-on: ubuntu-latest
name: Test Proxy
steps:
- uses: actions/checkout@v2
- name: Proxy Integration Tests
# Need it so ACTIONS_CACHE_URL and ACTIONS_RUNTIME_TOKEN are available
uses: cedrickring/golang-action@1.6.0
with:
args: cd proxy && go test -v ./...
- name: Push Image
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
env:
CR_PAT: ${{secrets.CR_PAT}}
run: |
echo ${{ secrets.CR_PAT }} | docker login ghcr.io -u $GITHUB_ACTOR --password-stdin
docker build proxy --tag ghcr.io/cirruslabs/actions-http-cache-proxy:latest
docker push ghcr.io/cirruslabs/actions-http-cache-proxy:latest