-
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4f05ed7
commit 7e521bb
Showing
1 changed file
with
29 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,58 +16,50 @@ env: | |
PUBLIC_UMAMI_SCRIPT_URL: ${{ secrets.GATSBY_UMAMI_SCRIPT_URL }} | ||
PUBLIC_UMAMI_WEBSITE_ID: ${{ secrets.GATSBY_UMAMI_WEBSITE_ID }} | ||
PUBLIC_INFURA_ID: ${{ secrets.GATSBY_INFURA_ID }} | ||
PUBLIC_WALLETCONNECT_ID: ${{ secrets.GATSBY_WALLETCONNECT_ID }} | ||
|
||
jobs: | ||
test-unit: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, macos-latest] | ||
node: ['18'] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
|
||
- name: Cache node_modules | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.npm | ||
key: ${{ runner.os }}-node-test-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: ${{ runner.os }}-node-test- | ||
|
||
node-version: ${{ matrix.node }} | ||
cache: 'npm' | ||
- run: npm ci | ||
- run: npm test | ||
|
||
- run: npm run test:unit | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: coverage | ||
name: coverage-${{ matrix.os }}-${{ matrix.node }} | ||
path: coverage/ | ||
|
||
test-e2e: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, macos-latest] | ||
node: ['18'] | ||
runs-on: ${{ matrix.os }} | ||
timeout-minutes: 60 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
|
||
- name: Cache node_modules | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.npm | ||
key: ${{ runner.os }}-node-e2e-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: ${{ runner.os }}-node-e2e- | ||
|
||
node-version: ${{ matrix.node }} | ||
cache: 'npm' | ||
- run: npm ci | ||
|
||
- name: Install Playwright Browsers | ||
run: npx playwright install --with-deps | ||
|
||
- run: npx playwright install --with-deps | ||
- run: npm run test:e2e | ||
|
||
- uses: actions/upload-artifact@v3 | ||
if: always() | ||
with: | ||
name: playwright-report | ||
name: playwright-report-${{ matrix.os }}-${{ matrix.node }} | ||
path: playwright-report/ | ||
retention-days: 30 | ||
|
||
|
@@ -77,30 +69,25 @@ jobs: | |
matrix: | ||
os: [ubuntu-latest, macos-latest] | ||
node: ['18'] | ||
|
||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
|
||
- name: Cache node_modules & Astro build output | ||
cache: 'npm' | ||
- name: Cache Astro build output | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.npm | ||
${{ github.workspace }}/dist | ||
key: ${{ runner.os }}-${{ matrix.node }}-astro-build-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx', '**.astro') }} | ||
restore-keys: ${{ runner.os }}-${{ matrix.node }}-astro-build-${{ hashFiles('**/package-lock.json') }}- | ||
|
||
path: ${{ github.workspace }}/dist | ||
key: ${{ runner.os }}-${{ matrix.node }}-astro-build-${{ hashFiles('**.[jt]s', '**.[jt]sx', '**.astro') }} | ||
restore-keys: ${{ runner.os }}-${{ matrix.node }}-astro-build-${{ hashFiles('**.[jt]s', '**.[jt]sx', '**.astro') }} | ||
- run: npm ci | ||
- run: npm run build | ||
|
||
- uses: actions/upload-artifact@v1 | ||
if: github.ref == 'refs/heads/main' | ||
with: | ||
name: dist | ||
name: dist-${{ runner.os }}-${{ matrix.node }} | ||
path: dist | ||
|
||
coverage: | ||
|
@@ -111,7 +98,7 @@ jobs: | |
- uses: actions/checkout@v3 | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: coverage | ||
name: coverage-ubuntu-latest-18 | ||
- uses: paambaati/[email protected] | ||
env: | ||
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} | ||
|
@@ -125,7 +112,7 @@ jobs: | |
- uses: actions/checkout@v3 | ||
- uses: actions/download-artifact@v1 | ||
with: | ||
name: dist | ||
name: dist-ubuntu-latest-18 | ||
- name: Deploy to S3 | ||
run: npm run deploy:s3 | ||
env: | ||
|