Relay timeouts #3645
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: unit-tests | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
unit-tests: | |
name: Unit Tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Add LocalStack AWS Credentials | |
run: | | |
mkdir -p ~/.aws | |
touch ~/.aws/credentials | |
echo '[default]' >> ~/.aws/credentials | |
echo 'aws_access_key_id=localstack' >> ~/.aws/credentials | |
echo 'aws_secret_access_key=localstack' >> ~/.aws/credentials | |
- name: Set Test Profile to default | |
run: | | |
aws configure --profile test-profile set region us-east-1 | |
aws configure --profile test-profile set source_profile default | |
- uses: actions/setup-go@v3 | |
with: | |
go-version: '1.21' # The Go version to download (if necessary) and use. | |
- run: go version | |
- name: Checkout EigenDA | |
uses: actions/checkout@v3 | |
- name: Build | |
run: make build | |
- name: Test all | |
run: ./test.sh -coverprofile=coverage.out | |
- name: Upload coverage artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: coverage | |
path: coverage.out | |
- name: Extract coverage | |
shell: bash | |
run: | | |
COVERAGE=$(go tool cover -func="coverage.out" | tail -1 | grep -Eo '[0-9]+\.[0-9]') | |
echo "coverage: $COVERAGE% of statements" | |
coverage-report: | |
name: Coverage Report | |
needs: unit-tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Update coverage badge | |
if: github.ref == 'refs/heads/master' | |
uses: ./.github/actions/test-coverage | |
with: | |
chart: true | |
amend: true |