Skip to content

feat: enhance MetaMask integration with wallet unlock prompts and con… #95

feat: enhance MetaMask integration with wallet unlock prompts and con…

feat: enhance MetaMask integration with wallet unlock prompts and con… #95

name: MassaStation e2e tests
on:
push:
# for these branchs, tests will be callend from publish workflow
branches-ignore:
- main
- next
workflow_call:
jobs:
format:
uses: ./.github/workflows/check-format.yml
massaStation-tests-e2e:
runs-on: ubuntu-latest
needs: format
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18'
cache: 'npm'
- name: Install dependencies
run: |
sudo apt update
npm ci
sudo apt install xvfb libnss3-tools libwebkit2gtk-4.1-0
- name: Build bundle
run: npm run build
- name: Download MassaStation
run: |
curl -L https://github.com/massalabs/station/releases/latest/download/massastation_linux_amd64 -o /usr/local/bin/massastation
sudo chmod +x /usr/local/bin/massastation
sudo setcap CAP_NET_BIND_SERVICE=+eip /usr/local/bin/massastation
- name: Install MassaStation
run: |
sudo mkdir -p /usr/local/share/massastation/
sudo chmod 777 /usr/local/share/massastation/
sudo mkdir -p /usr/local/share/massastation/logs/
sudo chmod 777 /usr/local/share/massastation/logs/
mkdir -p /usr/local/share/massastation/plugins/
sudo mkdir -p /etc/massastation/certs
sudo chmod 777 /etc/massastation/
sudo massastation -repair
mkdir -p $HOME/.config/massa-station-wallet/
echo "$WALLET_YML" > $HOME/.config/massa-station-wallet/wallet_e2e.yaml
env:
WALLET_YML: ${{ secrets.WALLET_YML }}
- name: Running Massastation
run: xvfb-run massastation > massastation_logs.txt &
env:
WALLET_PASSWORD: ${{ secrets.WALLET_PWD }}
- name: Define station.massa
run: sudo echo "127.0.0.1 station.massa" | sudo tee -a /etc/hosts
- name: Wait for server to be up
uses: juliangruber/sleep-action@v1
with:
time: 5s
- name: Install MassaStation Wallet
run: |
curl -X POST "http://station.massa/plugin-manager/?source=https://github.com/massalabs/station-massa-wallet/releases/latest/download/wallet-plugin_linux-amd64.zip"
- name: Switch to buildnet
run: curl -X POST "http://station.massa/network/buildnet"
- name: Test using dummy extension
run: NODE_EXTRA_CA_CERTS=/etc/massastation/certs/rootCA.pem npm run test:e2e
- name: Print MassaStation logs
if: always()
run: cat massastation_logs.txt