github.com/mysteriumnetwork/node@v0.0.0-20240516044423-365054f76801/.github/workflows/tests-and-linters.yml (about)

     1  name: Tests
     2  on:
     3    pull_request:
     4  
     5  env:
     6    GOFLAGS: "-count=1"
     7  
     8  jobs:
     9    unit-tests:
    10      runs-on: ubuntu-latest
    11  
    12      steps:
    13        - uses: actions/checkout@v4
    14        - name: Setup Go
    15          uses: actions/setup-go@v5
    16          with:
    17            go-version: '1.21.x'
    18  
    19        - name: Install protoc
    20          run: |
    21            sudo apt-get update
    22            sudo apt-get install -y protobuf-compiler
    23  
    24        - name: Unit tests and linters
    25          run: |
    26            go run mage.go -v Generate
    27            go run mage.go -v Check
    28            go run mage.go -v TestWithCoverage
    29  
    30        - name: Upload codecov report 
    31          uses: codecov/codecov-action@v4
    32          with:
    33            file: ./coverage.txt
    34            token: ${{ secrets.CODECOV_TOKEN }}
    35  
    36    e2e-basic:
    37      runs-on: ubuntu-latest
    38  
    39      steps:
    40        - uses: actions/checkout@v4
    41        - name: Setup Go
    42          uses: actions/setup-go@v5
    43          with:
    44            go-version: '1.21.x'
    45  
    46        - name: Login to Docker Hub
    47          uses: docker/login-action@v3
    48          with:
    49             username: ${{ secrets.DOCKERHUB_USERNAME }}
    50             password: ${{ secrets.DOCKERHUB_PASSWORD }}
    51  
    52        - name: E2E basic test
    53          run: go run mage.go -v TestE2EBasic
    54  
    55    e2e-nat:
    56      runs-on: ubuntu-latest
    57  
    58      steps:
    59        - uses: actions/checkout@v4
    60        - name: Setup Go
    61          uses: actions/setup-go@v5
    62          with:
    63            go-version: '1.21.x'
    64  
    65        - name: Login to Docker Hub
    66          uses: docker/login-action@v3
    67          with:
    68             username: ${{ secrets.DOCKERHUB_USERNAME }}
    69             password: ${{ secrets.DOCKERHUB_PASSWORD }}
    70  
    71        - name: E2E NAT test
    72          run: go run mage.go -v TestE2ENAT
    73  
    74    verify-build:
    75      needs: [unit-tests, e2e-basic, e2e-nat]
    76      uses: ./.github/workflows/build-packages.yml
    77      secrets: inherit