Skip to content

Commit

Permalink
ci: Switch from CircleCI to Github Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
oxyno-zeta committed Jul 3, 2021
1 parent 064785b commit 6dbd5df
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 118 deletions.
96 changes: 0 additions & 96 deletions .circleci/config.yml

This file was deleted.

70 changes: 70 additions & 0 deletions .github/workflows/ci.yml
@@ -0,0 +1,70 @@
name: ci
on:
push:
branches-ignore:
- "github-pages"
pull_request: {}
jobs:
lint:
if: |
(github.repository == 'oxyno-zeta/s3-proxy')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: "^1.16.0"
- run: make code/lint
build:
if: |
(github.repository == 'oxyno-zeta/s3-proxy')
runs-on: ubuntu-latest
needs:
- lint
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: "^1.16.0"
- run: make code/build
build-cross:
if: |
(github.repository == 'oxyno-zeta/s3-proxy')
runs-on: ubuntu-latest
needs:
- lint
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: "^1.16.0"
- run: make code/build-cross
test:
if: |
(github.repository == 'oxyno-zeta/s3-proxy')
runs-on: ubuntu-latest
needs:
- lint
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: "^1.16.0"
- run: |
if [ -f /usr/local/bin/dockerize ]; then
echo "dockerize found; skipping installation";
else
wget https://github.com/jwilder/dockerize/releases/download/v0.6.0/dockerize-linux-amd64-v0.6.0.tar.gz \
&& sudo tar -C /usr/local/bin -xzvf dockerize-linux-amd64-v0.6.0.tar.gz \
&& rm dockerize-linux-amd64-v0.6.0.tar.gz;
fi
- run: make setup/services
- run: dockerize -wait tcp://localhost:8088 -timeout 5m
- run: dockerize -wait tcp://localhost:8181 -timeout 5m
- run: docker logs keycloak
- run: make test/all
- run: make test/coverage
- run: go get github.com/mattn/goveralls
- env:
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: goveralls -coverprofile=c.out -service=github
26 changes: 4 additions & 22 deletions .github/workflows/docs.yml
@@ -1,29 +1,13 @@
name: docs
on:
push:
branches:
- "*"
branches-ignore:
- "github-pages"
pull_request: {}
jobs:
changes:
if: |
(github.repository == 'oxyno-zeta/s3-proxy')
runs-on: ubuntu-latest
outputs:
docs: ${{ steps.filter.outputs.docs }}
steps:
- uses: actions/checkout@v2
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
docs:
- 'docs/**/*'
docs-build:
needs:
- changes
if: |
(github.repository == 'oxyno-zeta/s3-proxy') &&
(needs.changes.outputs.docs == 'true')
(github.repository == 'oxyno-zeta/s3-proxy')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -36,10 +20,8 @@ jobs:
docs-deploy:
needs:
- docs-build
- changes
if: |
(github.repository == 'oxyno-zeta/s3-proxy') &&
(needs.changes.outputs.docs == 'true') &&
(github.ref == 'refs/heads/master')
runs-on: ubuntu-latest
steps:
Expand Down

0 comments on commit 6dbd5df

Please sign in to comment.