Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: switch to github actions #18

Merged
merged 16 commits into from
May 13, 2024
54 changes: 0 additions & 54 deletions .circleci/config.yml

This file was deleted.

52 changes: 52 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: ci

on:
push:
branches: [ "main" ]
pull_request:

jobs:

test:
runs-on: ubuntu-latest
steps:
- name: Set environment variables
run: |
echo "GIT_COMMIT_SHA=${{ github.event.pull_request.head.sha }}" >> "$GITHUB_ENV"
echo "GIT_BRANCH=${GITHUB_HEAD_REF}" >> "$GITHUB_ENV"

- name: Setup Code Climate test-reporter
run: |
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > /tmp/cc-test-reporter
chmod +x /tmp/cc-test-reporter
/tmp/cc-test-reporter before-build

- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.20'

- name: Setup gotestsum
uses: autero1/[email protected]
with:
gotestsum_version: 1.11.0

- name: Build
run: go build -v ./...

- name: Test
run: |
mkdir -p /tmp/test-results
gotestsum \
--junitfile /tmp/test-results/gotestsum-report.xml \
-- \
-failfast \
-covermode atomic \
-coverprofile c.out \
./...
/tmp/cc-test-reporter after-build \
--id ${{ secrets.CC_TEST_REPORTER_ID }} \
--prefix waku-poker-planning \
--exit-code $?
Loading