Skip to content

Commit

Permalink
Adding matrix to support more tests, integrating notification
Browse files Browse the repository at this point in the history
  • Loading branch information
signorecello committed Dec 20, 2023
1 parent 6acb319 commit 2d634a5
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 23 deletions.
31 changes: 24 additions & 7 deletions .github/workflows/nightly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,23 +37,27 @@ jobs:
run:
working-directory: vite-hardhat
strategy:
matrix: ${{fromJson(needs.setup.outputs.matrix)}}
matrix:
version:
- version: ${{fromJson(needs.setup.outputs.matrix.key)}}
- version_number: ${{fromJson(needs.setup.outputs.matrix.value)}}
project: [vite-hardhat]
steps:
- uses: actions/checkout@v4

- name: Set up test environment
uses: ./.github/actions/setup
with:
project: vite-hardhat
version: ${{ matrix.value }}
version: ${{ matrix.version.version_number }}

- name: Install test version
run: |
yarn add \
@noir-lang/noir_js@${{ matrix.value }} \
@noir-lang/backend_barretenberg@${{ matrix.value }} \
@noir-lang/noir_wasm@${{ matrix.value }} \
@noir-lang/types@${{ matrix.value }}
@noir-lang/noir_js@${{ matrix.version.version_number }} \
@noir-lang/backend_barretenberg@${{ matrix.version.version_number }} \
@noir-lang/noir_wasm@${{ matrix.version.version_number }} \
@noir-lang/types@${{ matrix.version.version_number }}
- name: 'Create env file'
run: |
Expand All @@ -70,4 +74,17 @@ jobs:

- name: Run test
run: yarn test
continue-on-error: ${{ matrix.key == 'prerelease' }}
id: yarn_test
continue-on-error: ${{ matrix.version.version == 'prerelease' }}

- name: Send GitHub Action trigger data to Slack workflow
id: slack
uses: slackapi/[email protected]
if: ${{ failure() && matrix.version.version == 'prerelease' }}
with:
payload: |
{
"text": "Hey! Just to let you know that once the prerelease becomes stable, you'll need to update the following project: ${{ matrix.project }}. ",
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
16 changes: 0 additions & 16 deletions .github/workflows/testingslack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,3 @@ name: Testing
on:
# Giving ourselves a way to trigger this manually
push:

jobs:
testing:
runs-on: ubuntu-latest
steps:
- name: Send GitHub Action trigger data to Slack workflow
id: slack
uses: slackapi/[email protected]
with:
# This data can be any valid JSON from a previous step in the GitHub Action
payload: |
{
"text": "Testing - From github PR action"
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

0 comments on commit 2d634a5

Please sign in to comment.