Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Cannot find Mage latest release #267

Closed
cep21 opened this issue Jan 28, 2023 · 3 comments · Fixed by #269
Closed

Error: Cannot find Mage latest release #267

cep21 opened this issue Jan 28, 2023 · 3 comments · Fixed by #269

Comments

@cep21
Copy link

cep21 commented Jan 28, 2023

If I check out this repository and run yarn test I get failures matching the release target. This also happens when running the action against github for our repositories. This appears to be a new thing: maybe an hour old?

 FAIL  __tests__/github.test.ts
  github
    ✕ returns latest Mage GitHub release (675 ms)
    ✕ returns v1.8.0 Mage GitHub release (472 ms)

  ● github › returns latest Mage GitHub release

    expect(received).not.toBeNull()

    Received: null

       5 |   it('returns latest Mage GitHub release', async () => {
       6 |     const release = await github.getRelease('latest');
    >  7 |     expect(release).not.toBeNull();
         |                         ^
       8 |     expect(release?.tag_name).not.toEqual('');
       9 |   });
      10 |

      at __tests__/github.test.ts:7:25
      at fulfilled (__tests__/github.test.ts:28:58)

  ● github › returns v1.8.0 Mage GitHub release

    expect(received).not.toBeNull()

    Received: null

      11 |   it('returns v1.8.0 Mage GitHub release', async () => {
      12 |     const release = await github.getRelease('v1.8.0');
    > 13 |     expect(release).not.toBeNull();
         |                         ^
      14 |     expect(release?.tag_name).toEqual('v1.8.0');
      15 |   });
      16 | });

      at __tests__/github.test.ts:13:25
      at fulfilled (__tests__/github.test.ts:28:58)

--------------|---------|----------|---------|---------|-------------------
File          | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s 
--------------|---------|----------|---------|---------|-------------------
All files     |   48.78 |     6.67 |      75 |   46.15 |                   
 github.ts    |     100 |      100 |     100 |     100 |                   
 installer.ts |   38.24 |     6.67 |      50 |   38.24 | 16-45,49-52       
--------------|---------|----------|---------|---------|-------------------

@cep21
Copy link
Author

cep21 commented Jan 28, 2023

It's possible you want to use curl -H "Accept: application/json" https://api.github.com/repos/magefile/mage/releases/latest instead of curl -H "Accept: application/json" https://github.com/magefile/mage/releases/latest at

const url = `https://github.com/magefile/mage/releases/${version}`;

@crazy-max
Copy link
Member

See docker/setup-buildx-action#190 (comment)

GitHub API sad 😣

@sheimi
Copy link

sheimi commented Jan 28, 2023

created a PR to mitigate this issue by using Github Action API: #268

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants