From e689b131060f23bada216795243c368c79e27b6b Mon Sep 17 00:00:00 2001 From: "fryorcraken.eth" Date: Fri, 19 Aug 2022 23:13:40 +1000 Subject: [PATCH 1/6] ci: buildbuf is not used --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e9530e927a..849f7e85b8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,7 +9,6 @@ on: pull_request: env: - BUF_VERSION: "0.56.0" NIM_WAKU_VERSION: "v0.9" NODE_JS: "16" From b47fe21e3920cd8c0aae686cf59646d274fb46c8 Mon Sep 17 00:00:00 2001 From: "fryorcraken.eth" Date: Fri, 19 Aug 2022 23:16:16 +1000 Subject: [PATCH 2/6] ci: only test on ubuntu Browser is what actually matter. --- .github/workflows/ci.yml | 5 +---- bors.toml | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 849f7e85b8..29cd373044 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,10 +14,7 @@ env: jobs: build_and_test: - strategy: - matrix: - os: [ubuntu-latest] - runs-on: ${{ matrix.os }} + runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v2.3.3 diff --git a/bors.toml b/bors.toml index a5772cdb39..a2829db67e 100644 --- a/bors.toml +++ b/bors.toml @@ -1,5 +1,5 @@ status = [ - "build_and_test (ubuntu-latest)", + "build_and_test", "examples_build_and_test (eth-pm)", "examples_build_and_test (eth-pm-wallet-encryption)", "examples_build_and_test (relay-angular-chat)", From 6019082240790ee595b6b7edcfd8e8afc388c64e Mon Sep 17 00:00:00 2001 From: "fryorcraken.eth" Date: Fri, 19 Aug 2022 23:19:33 +1000 Subject: [PATCH 3/6] ci: bump actions/checkout to v3 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 29cd373044..faf9dacd6b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,7 +17,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v2.3.3 + uses: actions/checkout@v3 - name: Get nim-waku shell: bash From 0ec17c2f9656c6255857e9e50c4e22663d23a232 Mon Sep 17 00:00:00 2001 From: "fryorcraken.eth" Date: Fri, 19 Aug 2022 23:26:31 +1000 Subject: [PATCH 4/6] ci: split in several jobs --- .github/workflows/ci.yml | 86 ++++++++++++++++++++++++++-------------- 1 file changed, 57 insertions(+), 29 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index faf9dacd6b..f0c6e0e212 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,40 +13,41 @@ env: NODE_JS: "16" jobs: - build_and_test: + check: runs-on: ubuntu-latest steps: - - name: Checkout code - uses: actions/checkout@v3 - - - name: Get nim-waku - shell: bash - run: | - mkdir -p nim-waku/build - cd nim-waku - wget "https://github.com/status-im/nim-waku/releases/download/${NIM_WAKU_VERSION}/nim-waku-ubuntu-latest.tar.gz" - tar xavf nim-waku-ubuntu-latest.tar.gz - - - name: Install NodeJS - uses: actions/setup-node@v3 + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 with: node-version: ${{ env.NODE_JS }} + - uses: bahmutov/npm-install@v1 + - run: npm run test:lint + - run: npm run test:prettier + - run: npm run test:spelling + - run: npm run test:tsc - - name: Ensure wakunode2 is ready - shell: bash - run: | - uname -a - cd nim-waku/build - ./wakunode2 --help - - - name: install using npm ci - uses: bahmutov/npm-install@v1 + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: ${{ env.NODE_JS }} + - uses: bahmutov/npm-install@v1 + - run: npm run build + proto: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: ${{ env.NODE_JS }} + - uses: bahmutov/npm-install@v1 - name: Generate protobuf code run: | npm run proto npm run fix - - name: Check all protobuf code was committed shell: bash run: | @@ -54,13 +55,40 @@ jobs: echo -n "'$res'" # For debug purposes [ $(echo -n "$res"|wc -l) -eq 0 ] - - name: build - run: npm run build + browser: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: ${{ env.NODE_JS }} + - uses: bahmutov/npm-install@v1 + - run: npm run test:browser - - name: test + node: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Get nim-waku + shell: bash + run: | + mkdir -p nim-waku/build + cd nim-waku + wget "https://github.com/status-im/nim-waku/releases/download/${NIM_WAKU_VERSION}/nim-waku-ubuntu-latest.tar.gz" + tar xavf nim-waku-ubuntu-latest.tar.gz + - name: Ensure wakunode2 is ready + shell: bash + run: | + uname -a + cd nim-waku/build + ./wakunode2 --help + - uses: actions/setup-node@v3 + with: + node-version: ${{ env.NODE_JS }} + - uses: bahmutov/npm-install@v1 + - run: npm run test:node env: DEBUG: "waku:nim-waku*,waku:test*" - run: npm run test - name: Upload logs on failure uses: actions/upload-artifact@v2 @@ -72,7 +100,7 @@ jobs: release_next: runs-on: ubuntu-latest if: github.event_name == 'push' && github.ref == 'refs/heads/master' - needs: [build_and_test] + needs: [check, build, proto, browser, node] steps: - name: Checkout code uses: actions/checkout@v2.3.3 From 501a3329f0a2e416a136978af2b13e55f98755fc Mon Sep 17 00:00:00 2001 From: "fryorcraken.eth" Date: Fri, 19 Aug 2022 23:32:43 +1000 Subject: [PATCH 5/6] ci: remove trivial descriptions --- .github/workflows/ci.yml | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f0c6e0e212..64eb988f6d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -102,16 +102,11 @@ jobs: if: github.event_name == 'push' && github.ref == 'refs/heads/master' needs: [check, build, proto, browser, node] steps: - - name: Checkout code - uses: actions/checkout@v2.3.3 - - - name: Install NodeJS - uses: actions/setup-node@v3 + - uses: actions/checkout@v2.3.3 + - uses: actions/setup-node@v3 with: node-version: ${{ env.NODE_JS }} - - - name: install using npm ci - uses: bahmutov/npm-install@v1 + - uses: bahmutov/npm-install@v1 - name: Append git hash to version shell: bash @@ -124,5 +119,4 @@ jobs: - name: Authenticate with registry run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ./.npmrc - - name: publish - run: npm publish --tag next --access public + - run: npm publish --tag next --access public From e229aa1a197b1a7939b8558316059b850c526793 Mon Sep 17 00:00:00 2001 From: "fryorcraken.eth" Date: Fri, 19 Aug 2022 23:37:02 +1000 Subject: [PATCH 6/6] ci: update bors --- bors.toml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bors.toml b/bors.toml index a2829db67e..68e7661e1b 100644 --- a/bors.toml +++ b/bors.toml @@ -1,5 +1,9 @@ status = [ - "build_and_test", + "check", + "build", + "proto", + "browser", + "node", "examples_build_and_test (eth-pm)", "examples_build_and_test (eth-pm-wallet-encryption)", "examples_build_and_test (relay-angular-chat)",