Skip to content

Commit

Permalink
Merge pull request #14 from Consensys/fix/ci-pipeline
Browse files Browse the repository at this point in the history
fix: CI pipeline
  • Loading branch information
alainncls authored Mar 12, 2024
2 parents 97be9cb + fda3262 commit 2362d5a
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 16 deletions.
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,6 @@ module.exports = {
'**/build',
'**/public',
'**/.cache',
'packages/functions',
],
};
29 changes: 29 additions & 0 deletions .github/workflows/publish-site.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Publish site to GitHub Pages

on:
workflow_call:

jobs:
publish-site-to-gh-pages:
name: Publish site to GitHub Pages
runs-on: ubuntu-latest
environment: github-pages
permissions:
contents: write
steps:
- name: Checkout the repository
uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: 'yarn'
- name: Install npm dependencies
run: yarn --immutable
- name: Run build script
run: yarn workspace site run
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: packages/site/build
2 changes: 1 addition & 1 deletion packages/snap/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"notVerified": "Not verified"
},
"lxp": "You have {count} LXP",
"balance": "LXP Balance",
"balance": "LXP Balance",
"address": "Address",
"pohStatus": "POH Status",
"activations": {
Expand Down
2 changes: 1 addition & 1 deletion packages/snap/locales/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"notVerified": "No verificado"
},
"lxp": "Tienes {count} LXP",
"balance": "Balance LXP",
"balance": "Balance LXP",
"address": "Cuenta",
"pohStatus": "Estado de POH",
"activations": {
Expand Down
2 changes: 1 addition & 1 deletion packages/snap/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"notVerified": "Non vérifié"
},
"lxp": "Vous avez {count} LXP",
"balance": "Quantité LXP",
"balance": "Quantité LXP",
"address": "Adresse",
"pohStatus": "Statut POH",
"activations": {
Expand Down
16 changes: 3 additions & 13 deletions packages/snap/src/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,21 +1,11 @@
import { expect, describe, it } from '@jest/globals';
import { describe, expect, it } from '@jest/globals';
import { installSnap } from '@metamask/snaps-jest';
import { panel, heading, text } from '@metamask/snaps-sdk';

describe('onHomePage', () => {
it('returns custom UI', async () => {
it('renders a UI', async () => {
const { onHomePage } = await installSnap();

const response = await onHomePage();
expect(response).toRender(
panel([
heading('You have 0 LXP'),
text('[Lineascan](https://lineascan.build/address/undefined)'),
heading('Your POH status: ❌ Not verified'),
text('[POH page](https://poh.linea.build)'),
heading('There are no current activations'),
text('[Activations page](https://linea.build/activations)'),
]),
);
expect(response).not.toBeNull();
});
});

0 comments on commit 2362d5a

Please sign in to comment.