Skip to content

Commit

Permalink
Final Github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
stuart-bradley committed Feb 19, 2024
1 parent 931fd6f commit 035d56b
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 21 deletions.
22 changes: 12 additions & 10 deletions .github/workflows/e2e_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,16 @@ jobs:
- name: Check out Git repository
uses: actions/checkout@v4

- name: Cache
uses: actions/cache@v3
with:
path: |
~/.npm
${{ github.workspace }}/.next/cache
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx') }}
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-
- name: Set up Node.js
uses: actions/setup-node@v4
with:
Expand All @@ -27,16 +37,6 @@ jobs:
- name: Build
run: npm run build --if-present

- name: Cache
uses: actions/cache@v3
with:
path: |
~/.npm
${{ github.workspace }}/.next/cache
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx') }}
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-
- name: Run Cypress Tests
run: npm run cypress:ci

Expand All @@ -46,10 +46,12 @@ jobs:
with:
name: cypress-screenshots
path: cypress/screenshots
if-no-files-found: ignore

- name: Upload Video Artifacts
uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress-videos
path: cypress/videos
if-no-files-found: ignore
20 changes: 10 additions & 10 deletions .github/workflows/lint-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,16 @@ jobs:
- name: Check out Git repository
uses: actions/checkout@v4

- name: Cache
uses: actions/cache@v3
with:
path: |
~/.npm
${{ github.workspace }}/.next/cache
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx') }}
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-
- name: Set up Node.js
uses: actions/setup-node@v4
with:
Expand All @@ -31,16 +41,6 @@ jobs:
- name: Build
run: npm run build --if-present

- name: Cache
uses: actions/cache@v3
with:
path: |
~/.npm
${{ github.workspace }}/.next/cache
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx') }}
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-
- name: Lint
uses: wearerequired/lint-action@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/app.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ describe("BoardForm", () => {
ALGORITHM_RANDOM,
);
cy.get('[data-cy="rand-algorithm-selector"] option').should(
"have.value",
"not.have.value",
ALGORITHM_COASTAL,
);

Expand Down

0 comments on commit 035d56b

Please sign in to comment.