Skip to content

Commit

Permalink
add basic ci
Browse files Browse the repository at this point in the history
  • Loading branch information
frankgreco committed Aug 21, 2024
1 parent e6a6bfa commit c8f3f86
Show file tree
Hide file tree
Showing 2 changed files with 94 additions and 1 deletion.
94 changes: 94 additions & 0 deletions .github/workflows/default.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
---
name: default
on:
push:
branches:
- "**"
jobs:
check:
runs-on: blacksmith-2vcpu-ubuntu-2204
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: .go-version
- uses: bufbuild/[email protected]
with:
buf_user: frankgrecojr
buf_api_token: ${{ secrets.BUF_APIKEY }}
github_token: ${{ secrets.GITHUB_TOKEN }}
- run: make deps
- uses: pre-commit/[email protected]
- uses: azure/setup-helm@v4
with:
version: "v3.9.0"
- run: helm repo add bitnami https://charts.bitnami.com/bitnami
- run: make helm-template
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
- run: make check
working-directory: workers/javascript
- uses: actions/setup-python@v5
with:
python-version-file: ./workers/python/.python-version
- run: |
make deps-dev
CHECK=true make fmt
working-directory: workers/python
test-go:
runs-on: blacksmith-4vcpu-ubuntu-2204
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: .go-version
- name: unit tests
run: make test-unit GO_TEST_ARGS="-v -cover -covermode atomic -race"
- name: integration tests
run: make test-integration
- name: upload coverage report to codecov
uses: codecov/codecov-action@v4
with:
name: ${{ github.job }}
fail_ci_if_error: true
flags: test-go
token: ${{ secrets.CODECOV_TOKEN }}
test-js:
runs-on: blacksmith-8vcpu-ubuntu-2204
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
- run: |
make build
npx pnpm --filter @superblocks/worker.js test:unit
npx pnpm --no-bail --filter "@superblocksteam/*" --filter "!@superblocksteam/gsheets" test -- --testPathIgnorePatterns "(e2e|integration|local).test.ts"
working-directory: workers/javascript
- uses: codecov/codecov-action@v4
with:
name: ${{ github.job }}
fail_ci_if_error: true
flags: test-js
token: ${{ secrets.CODECOV_TOKEN }}
directory: workers/javascript
test-py:
runs-on: blacksmith-8vcpu-ubuntu-2204
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version-file: ./workers/python/.python-version
- run: |
pip3 install tox
make test TOX_EXTRA_ARGS="--cov-report lcov:coverage.out"
working-directory: workers/python
- uses: codecov/codecov-action@v4
with:
name: ${{ github.job }}
fail_ci_if_error: true
flags: test-py
token: ${{ secrets.CODECOV_TOKEN }}
directory: workers/python
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ charts/

/workers/python/coverage.json

/.github
/.vscode
/config
/helm/cloud-opa
Expand Down

0 comments on commit c8f3f86

Please sign in to comment.