diff --git a/src/vit-testing/.github/workflows/nix.yml b/src/vit-testing/.github/workflows/nix.yml index d21b493de7..860efc8f3e 100644 --- a/src/vit-testing/.github/workflows/nix.yml +++ b/src/vit-testing/.github/workflows/nix.yml @@ -1,69 +1,99 @@ name: Nix CI -on: - push: - branches: - - main - - catalyst-fund* - pull_request: -jobs: - decision: - name: Decide what we need to build - runs-on: ubuntu-latest +on: {} - outputs: - packages: ${{ steps.packages.outputs.packages }} +permissions: + id-token: write + contents: read - steps: - - name: Checkout - uses: actions/checkout@v3 +concurrency: + group: ${{ github.sha }} + cancel-in-progress: true - - name: Setup - uses: ./.github/actions/nix-common-setup - with: - CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }} +env: + AWS_REGION: eu-central-1 + AWS_ROLE_ARN: arn:aws:iam::332405224602:role/ci + ECR_REGISTRY: 332405224602.dkr.ecr.eu-central-1.amazonaws.com + S3_CACHE: s3://iog-catalyst-nix?region=eu-central-1 - - name: Packages - id: packages - run: | - packages=$(nix eval .#packages.x86_64-linux --apply builtins.attrNames --json) - echo "PACKAGES -> $packages" - echo "::set-output name=packages::$packages" - - build: - name: Build ${{ matrix.package }} package - needs: - - decision +jobs: + discover: + outputs: + hits: ${{ steps.discovery.outputs.hits }} + nix_conf: ${{ steps.discovery.outputs.nix_conf }} runs-on: ubuntu-latest - + concurrency: + group: ${{ github.workflow }} + steps: + - name: Standard Discovery + uses: divnix/std-action/discover@v0.0.4 + id: discovery + build-packages: + needs: discover strategy: fail-fast: false matrix: - package: ${{ fromJSON(needs.decision.outputs.packages) }} - exclude: - - package: default - + target: ${{ fromJSON(needs.discover.outputs.hits).packages.build }} + name: ${{ matrix.target.cell }} - ${{ matrix.target.name }} + runs-on: ubuntu-latest steps: - - - name: Checkout - uses: actions/checkout@v3 - - - name: Setup - uses: ./.github/actions/nix-common-setup - with: - CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }} - - - name: Build package - run: | - path=$(nix eval --raw .#packages.x86_64-linux.${{ matrix.package }}) - hash=${path:11:32} - url="https://iog.cachix.org/$hash.narinfo"; - if curl --output /dev/null --silent --head --fail "$url"; then - echo "Nothing to build!!!" - echo "" - echo "See build log with:" - echo " nix log $path" - echo "" - else - nix build .#packages.x86_64-linux.${{ matrix.package }} --show-trace -L - fi + - name: Configure AWS Credentials + uses: aws-actions/configure-aws-credentials@v1.7.0 + with: + role-to-assume: ${{ env.AWS_ROLE_ARN }} + aws-region: ${{ env.AWS_REGION }} + - uses: divnix/std-action/run@v0.0.4 + with: + extra_nix_config: | + ${{ needs.discover.outputs.nix_conf }} + json: ${{ toJSON(matrix.target) }} + nix_key: ${{ secrets.NIX_SIGNING_KEY }} + cache: ${{ env.S3_CACHE }} + build-devshells: + needs: discover + strategy: + fail-fast: false + matrix: + target: ${{ fromJSON(needs.discover.outputs.hits).devshells.build }} + name: ${{ matrix.target.cell }} - ${{ matrix.target.name }} + runs-on: ubuntu-latest + steps: + - name: Configure AWS Credentials + uses: aws-actions/configure-aws-credentials@v1.7.0 + with: + role-to-assume: ${{ env.AWS_ROLE_ARN }} + aws-region: ${{ env.AWS_REGION }} + - uses: divnix/std-action/run@v0.0.4 + with: + extra_nix_config: | + ${{ needs.discover.outputs.nix_conf }} + json: ${{ toJSON(matrix.target) }} + nix_key: ${{ secrets.NIX_SIGNING_KEY }} + cache: ${{ env.S3_CACHE }} + publish-containers: + if: github.ref == 'refs/heads/main' + needs: + - discover + - build-packages + strategy: + fail-fast: false + matrix: + target: ${{ fromJSON(needs.discover.outputs.hits).containers.publish }} + name: ${{ matrix.target.cell }} - ${{ matrix.target.name }} + runs-on: ubuntu-latest + steps: + - name: Configure AWS Credentials + uses: aws-actions/configure-aws-credentials@v1.7.0 + with: + role-to-assume: ${{ env.AWS_ROLE_ARN }} + aws-region: ${{ env.AWS_REGION }} + - name: Configure Registry + run: | + aws ecr get-login-password --region eu-central-1 | docker login --username AWS --password-stdin "${{ env.ECR_REGISTRY }}" + - uses: divnix/std-action/run@v0.0.4 + with: + extra_nix_config: | + ${{ needs.discover.outputs.nix_conf }} + json: ${{ toJSON(matrix.target) }} + nix_key: ${{ secrets.NIX_SIGNING_KEY }} + cache: ${{ env.S3_CACHE }} \ No newline at end of file diff --git a/wallet-automation/typhon/typhon-wallet-registration.spec.ts b/wallet-automation/typhon/typhon-wallet-registration.spec.ts index f68f7ebb6a..52eb099351 100644 --- a/wallet-automation/typhon/typhon-wallet-registration.spec.ts +++ b/wallet-automation/typhon/typhon-wallet-registration.spec.ts @@ -107,7 +107,7 @@ test('import wallet', async ({ }) => { } else { console.log('element not found for the specified XPath:', divSelector); } - + // const copyAddress = '#receiveAddress > div > div.grow > button'; // await newTab.waitForSelector(copyAddress, { state: 'visible' }); // await newTab.click(copyAddress);