From 57d3e534bae2e69f9a69d6ea628fe50cf940870b Mon Sep 17 00:00:00 2001 From: Frank Greco Jr Date: Mon, 26 Aug 2024 19:28:03 -0400 Subject: [PATCH] add back github directory after bug in sync script --- .github/workflows/default.yaml | 95 ++++++++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 .github/workflows/default.yaml diff --git a/.github/workflows/default.yaml b/.github/workflows/default.yaml new file mode 100644 index 00000000..9abf8dea --- /dev/null +++ b/.github/workflows/default.yaml @@ -0,0 +1,95 @@ +--- +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/buf-setup-action@v1.35.1 + with: + buf_user: frankgrecojr + buf_api_token: ${{ secrets.BUF_APIKEY }} + github_token: ${{ secrets.GITHUB_TOKEN }} + - run: make deps + - uses: pre-commit/action@v3.0.1 + - 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 + \ No newline at end of file