Skip to content

Commit

Permalink
fix(ci): setup test
Browse files Browse the repository at this point in the history
  • Loading branch information
pepoviola committed Feb 19, 2025
1 parent f6c05a4 commit d53ddee
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/setup-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,21 @@ env:
permissions: {}

jobs:
get_releases:
# get the releases from macos is hitting the rate limit on the api constantly
# so, we download the whole info here and we share as artifact.
runs-on: ubuntu-latest
steps:
- name: perform_request
run: |
curl -s https://api.github.com/repos/paritytech/polkadot-sdk/releases > releases.json
- name: upload_releases
uses: actions/upload-artifact@v4
with:
name: releases-${{ github.sha }}.json
path: |
releases.json
setup_test:
strategy:
matrix:
Expand All @@ -32,6 +47,11 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Download request file
uses: actions/[email protected]
with:
name: releases-${{ github.sha }}.json
- run: ls -l
- run: npm install && npm update
working-directory: "./javascript"
- run: npm run build
Expand Down
8 changes: 8 additions & 0 deletions javascript/packages/cli/src/actions/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,14 @@ const downloadBinaries = async (binaries: string[]): Promise<void> => {
};

const getAllReleases = async (repo: string): Promise<any> => {
// allow to read releases from file
if (process.env.ZOMBIE_RELEASES_FILE) {
const content = await fs.promises.readFile(
process.env.ZOMBIE_RELEASES_FILE,
);
return JSON.parse(content.toString());
}

const release_url = `https://api.github.com/repos/paritytech/${repo}/releases`;
debug(`release url: ${release_url}`);
const headers: any = {
Expand Down

0 comments on commit d53ddee

Please sign in to comment.