Skip to content

Commit

Permalink
x - delete - focus CI on itest
Browse files Browse the repository at this point in the history
x
  • Loading branch information
yyforyongyu committed Nov 22, 2024
1 parent 4503a98 commit 0951926
Showing 1 changed file with 1 addition and 234 deletions.
235 changes: 1 addition & 234 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,204 +34,6 @@ env:
GO_VERSION: 1.22.6

jobs:
########################
# SQLC code gen check
########################
sqlc-check:
name: Sqlc check
runs-on: ubuntu-latest
steps:
- name: git checkout
uses: actions/checkout@v3

- name: setup go ${{ env.GO_VERSION }}
uses: ./.github/actions/setup-go
with:
go-version: '${{ env.GO_VERSION }}'

- name: docker image cache
uses: satackey/[email protected]
# Ignore the failure of a step and avoid terminating the job.
continue-on-error: true

- name: Generate sql models
run: make sqlc-check

########################
# RPC and mobile compilation check
########################
rpc-check:
name: RPC and mobile compilation check
runs-on: ubuntu-latest
steps:
- name: git checkout
uses: actions/checkout@v3

- name: setup go ${{ env.GO_VERSION }}
uses: ./.github/actions/setup-go
with:
go-version: '${{ env.GO_VERSION }}'

- name: run check
run: make rpc-check

- name: run JSON/WASM stub compilation check
run: make rpc-js-compile

- name: build mobile RPC bindings
run: make mobile-rpc

- name: build mobile specific code
run: go build --tags="mobile" ./mobile

########################
# check commits
########################
check-commits:
if: github.event_name == 'pull_request'
name: check commits
runs-on: ubuntu-latest
steps:
- name: git checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: setup go ${{ env.GO_VERSION }}
uses: ./.github/actions/setup-go
with:
go-version: '${{ env.GO_VERSION }}'

- name: fetch and rebase on ${{ github.base_ref }}
uses: ./.github/actions/rebase

- name: check commits
run: scripts/check-each-commit.sh upstream/${{ github.base_ref }}

########################
# lint code
########################
lint:
name: lint code
runs-on: ubuntu-latest
steps:
- name: git checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: setup go ${{ env.GO_VERSION }}
uses: ./.github/actions/setup-go
with:
go-version: '${{ env.GO_VERSION }}'

- name: check code format
run: make fmt-check

- name: check go modules tidiness
run: make tidy-module-check

- name: lint proto files
run: make protolint

- name: lint
run: GOGC=50 make lint

########################
# cross compilation
########################
cross-compile:
name: cross compilation
runs-on: ubuntu-latest
steps:
- name: git checkout
uses: actions/checkout@v3

- name: setup go ${{ env.GO_VERSION }}
uses: ./.github/actions/setup-go
with:
go-version: '${{ env.GO_VERSION }}'
key-prefix: cross-compile

- name: build release for all architectures
run: make release

########################
# sample configuration check
########################
sample-conf-check:
name: sample configuration check
runs-on: ubuntu-latest
steps:
- name: git checkout
uses: actions/checkout@v3

- name: setup go ${{ env.GO_VERSION }}
uses: ./.github/actions/setup-go
with:
go-version: '${{ env.GO_VERSION }}'

- name: check default values in sample-lnd.conf file
run: make sample-conf-check

########################
# run unit tests
########################
unit-test:
name: run unit tests
runs-on: ubuntu-latest
strategy:
# Allow other tests in the matrix to continue if one fails.
fail-fast: false
matrix:
unit_type:
- btcd unit-cover
- unit tags="kvdb_etcd"
- unit tags="kvdb_postgres"
- unit tags="kvdb_sqlite"
- btcd unit-race
- unit-module

steps:
- name: git checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: fetch and rebase on ${{ github.base_ref }}
if: github.event_name == 'pull_request'
uses: ./.github/actions/rebase

- name: git checkout fuzzing seeds
uses: actions/checkout@v3
with:
repository: lightninglabs/lnd-fuzz
path: lnd-fuzz

- name: rsync fuzzing seeds
run: rsync -a --ignore-existing lnd-fuzz/ ./

- name: setup go ${{ env.GO_VERSION }}
uses: ./.github/actions/setup-go
with:
go-version: '${{ env.GO_VERSION }}'
key-prefix: unit-test

- name: install bitcoind
run: ./scripts/install_bitcoind.sh $BITCOIN_VERSION

- name: run ${{ matrix.unit_type }}
run: make ${{ matrix.unit_type }}

- name: Send coverage
uses: shogo82148/actions-goveralls@v1
if: matrix.unit_type == 'btcd unit-cover'
with:
path-to-profile: coverage.txt
flag-name: 'unit'
parallel: true


########################
# run ubuntu integration tests
########################
Expand Down Expand Up @@ -391,45 +193,10 @@ jobs:
path: logs-itest-macos.zip
retention-days: 5

########################
# check pinned dependencies
########################
dep-pin:
name: check pinned dependencies
runs-on: ubuntu-latest
strategy:
# Allow other tests in the matrix to continue if one fails.
fail-fast: false
matrix:
pinned_dep:
- google.golang.org/grpc v1.59.0
- github.com/golang/protobuf v1.5.3

steps:
- name: git checkout
uses: actions/checkout@v3

- name: ensure dependencies at correct version
run: if ! grep -q "${{ matrix.pinned_dep }}" go.mod; then echo dependency ${{ matrix.pinned_dep }} should not be altered ; exit 1 ; fi

########################
# check PR updates release notes
########################
milestone-check:
name: check release notes updated
runs-on: ubuntu-latest
if: '!contains(github.event.pull_request.labels.*.name, ''no-changelog'')'
steps:
- name: git checkout
uses: actions/checkout@v3

- name: release notes check
run: scripts/check-release-notes.sh

# Notify about the completion of all coverage collecting jobs.
finish:
if: ${{ always() }}
needs: [unit-test, ubuntu-integration-test]
needs: [ubuntu-integration-test]
runs-on: ubuntu-latest
steps:
- uses: shogo82148/actions-goveralls@v1
Expand Down

0 comments on commit 0951926

Please sign in to comment.