-
Notifications
You must be signed in to change notification settings - Fork 359
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
[Question] Can I fetch dependacies from a private repo? #569
Comments
@khamiltonuk did you solve it? Thanks! |
@max-sym nope, Never managed to solve it, just abandoned it. I will give it another try tomorrow. Perhaps the future version of me is more competent than the past version of me |
It may sound radical, but my solution was to not use cypress github action and do everything manually :D name: 'E2E Tests'
on:
pull_request:
jobs:
E2E:
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
# IMPORTANT: We must not use yarn cache here, otherwise you will get an error with Cypress binary not found
node-version: '16'
registry-url: 'https://npm.pkg.github.com'
- run: yarn install --frozen-lockfile
env:
NODE_AUTH_TOKEN: ${{ secrets.YOUR_TOKEN }}
- name: Build app
run: yarn build
- name: Run app in background
run: yarn start & yarn wait-on http://localhost:8000 --timeout 5000
- name: Run Cypress tests
run: yarn cypress run
- name: Upload screenshots of failed e2e tests
uses: actions/upload-artifact@v3
if: failure()
with:
name: cypress-screenshots
path: cypress/screenshots
- name: Upload videos of e2e tests
uses: actions/upload-artifact@v3
if: failure()
with:
name: cypress-videos
path: cypress/videos
|
And with cache: name: 'E2E Tests'
on:
pull_request:
jobs:
E2E:
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: |
~/.cache/Cypress
node_modules
key: e2e-cache-${{ hashFiles('yarn.lock') }}
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: '16'
registry-url: 'https://npm.pkg.github.com'
- run: yarn install --frozen-lockfile
env:
NODE_AUTH_TOKEN: ${{ secrets.YOUR_TOKEN }}
- name: Build app
run: yarn build
- name: Run app in background
run: yarn start & yarn wait-on http://localhost:8000 --timeout 5000
- name: Run Cypress tests
run: yarn cypress run
- name: Upload screenshots of failed e2e tests
uses: actions/upload-artifact@v3
if: failure()
with:
name: cypress-screenshots
path: cypress/screenshots
- name: Upload videos of e2e tests
uses: actions/upload-artifact@v3
if: failure()
with:
name: cypress-videos
path: cypress/videos
|
I was able to solve doing the following:
Import piece is make sure it's after checkout so npmrc registered against repo. Also before Cypress Run so repo has it. |
Was the answer from @CharlieGreenman helpful to you? Can we close this issue? |
Firstly thank you for your repo
What's the problem
I have supplied my github token and my .npmrc but it I still get 401 Unauthorized when trying to fetch my dependancies
this is my config
but this is my output
The text was updated successfully, but these errors were encountered: