Skip to content

Commit

Permalink
ci: use lockfile
Browse files Browse the repository at this point in the history
Signed-off-by: Jakub Mucha <[email protected]>
  • Loading branch information
drptbl committed Sep 9, 2022
1 parent 33e02e5 commit 2573aaa
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 60 deletions.
118 changes: 59 additions & 59 deletions .github/workflows/audit_and_lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
continue-on-error: true

- name: Install dependencies
run: yarn --prefer-offline --no-audit
run: yarn --frozen-lockfile --prefer-offline --no-audit

- name: Lint
# run only on master/dev branch and pull requests
Expand All @@ -81,61 +81,61 @@ jobs:
sarif_file: lint-results.sarif
continue-on-error: true

e2e:
needs: build
# run only on master/dev branch
if:
github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev' ||
github.event_name == 'pull_request'
runs-on: ubuntu-latest

container:
image: synthetixio/docker-e2e:16.17-ubuntu

steps:
- name: Chown workspace
run: chown -R $(whoami) .

- name: Checkout
uses: actions/checkout@1e204e9a9253d643386038d443f96446fa156a97 # pin@v2

- name: Set yarn cache directory
run: yarn config set cache-folder .yarn-cache
continue-on-error: true

- uses: actions/cache@fd5de65bc895cf536527842281bea11763fefd77 # pin@v2
with:
path: |
.yarn-cache
node_modules
key: ${{ runner.os }}-yarn-v1-e2e-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-v1-e2e-
continue-on-error: true

- name: Install dependencies
run: yarn --prefer-offline --no-audit
env:
CYPRESS_CACHE_FOLDER:
${{ github.workspace }}/node_modules/.cache/Cypress

- name: Run e2e tests
run: yarn test:e2e
env:
CYPRESS_PRIVATE_KEY_WITH_FUNDS:
${{ secrets.CYPRESS_PRIVATE_KEY_WITH_FUNDS }}
# CYPRESS_PROJECT_ID: ${{ secrets.CYPRESS_PROJECT_ID }}
# CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CYPRESS_CACHE_FOLDER:
${{ github.workspace }}/node_modules/.cache/Cypress

- name: Archive e2e artifacts
uses: actions/upload-artifact@27121b0bdffd731efa15d66772be8dc71245d074 # pin@v2
if: always()
with:
name: e2e-artifacts
path: |
tests/e2e/videos
tests/e2e/screenshots
continue-on-error: true
# e2e:
# needs: build
# # run only on master/dev branch
# if:
# github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev' ||
# github.event_name == 'pull_request'
# runs-on: ubuntu-latest

# container:
# image: synthetixio/docker-e2e:16.17-ubuntu

# steps:
# - name: Chown workspace
# run: chown -R $(whoami) .

# - name: Checkout
# uses: actions/checkout@1e204e9a9253d643386038d443f96446fa156a97 # pin@v2

# - name: Set yarn cache directory
# run: yarn config set cache-folder .yarn-cache
# continue-on-error: true

# - uses: actions/cache@fd5de65bc895cf536527842281bea11763fefd77 # pin@v2
# with:
# path: |
# .yarn-cache
# node_modules
# key: ${{ runner.os }}-yarn-v1-e2e-${{ hashFiles('**/yarn.lock') }}
# restore-keys: |
# ${{ runner.os }}-yarn-v1-e2e-
# continue-on-error: true

# - name: Install dependencies
# run: yarn --prefer-offline --no-audit
# env:
# CYPRESS_CACHE_FOLDER:
# ${{ github.workspace }}/node_modules/.cache/Cypress

# - name: Run e2e tests
# run: yarn test:e2e
# env:
# CYPRESS_PRIVATE_KEY_WITH_FUNDS:
# ${{ secrets.CYPRESS_PRIVATE_KEY_WITH_FUNDS }}
# # CYPRESS_PROJECT_ID: ${{ secrets.CYPRESS_PROJECT_ID }}
# # CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# CYPRESS_CACHE_FOLDER:
# ${{ github.workspace }}/node_modules/.cache/Cypress

# - name: Archive e2e artifacts
# uses: actions/upload-artifact@27121b0bdffd731efa15d66772be8dc71245d074 # pin@v2
# if: always()
# with:
# name: e2e-artifacts
# path: |
# tests/e2e/videos
# tests/e2e/screenshots
# continue-on-error: true
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
run: chown -R $(whoami) .

- name: Install dependencies
run: yarn --prefer-offline --no-audit
run: yarn --frozen-lockfile --prefer-offline --no-audit

- name: git config
run: |
Expand Down

0 comments on commit 2573aaa

Please sign in to comment.