Skip to content

Commit

Permalink
Reuse workflow
Browse files Browse the repository at this point in the history
Enables the e2e Solana tests workflow to be reused by other projects.
  • Loading branch information
kalverra authored Jan 26, 2022
1 parent e68f44a commit 77c4901
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 5 deletions.
25 changes: 23 additions & 2 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
name: e2e_tests
on: [push]
on:
push:
workflow_call:
inputs:
repo_name:
required: true
default: ${{ github.repository }}
type: string
secrets:
QA_AWS_ACCESS_KEY_ID:
required: true
QA_AWS_SECRET_KEY:
required: true
QA_AWS_REGION:
required: true
QA_AWS_ROLE_TO_ASSUME:
required: true
QA_KUBECONFIG:
required: true

jobs:
build:
Expand All @@ -12,6 +30,8 @@ jobs:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
steps:
- uses: actions/checkout@v2
with:
repository: ${{ inputs.repo_name }}
- run: echo $HOME
- run: echo $PATH
- run: |
Expand All @@ -31,6 +51,8 @@ jobs:
steps:
- name: Checkout the repo
uses: actions/checkout@v2
with:
repository: ${{ inputs.repo_name }}
- name: Setup go
uses: actions/setup-go@v1
with:
Expand Down Expand Up @@ -76,7 +98,6 @@ jobs:
- name: Run Tests
env:
SELECTED_NETWORKS: solana
NETWORK_SETTINGS: /home/runner/work/chainlink-solana/chainlink-solana/tests/e2e/networks.yaml
run: |
export PATH=$PATH:$(go env GOPATH)/bin
ginkgo tests/e2e/smoke
Expand Down
8 changes: 5 additions & 3 deletions tests/e2e/utils/ginkgo.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package utils

import (
"github.com/smartcontractkit/integrations-framework/config"
"os"
"path/filepath"

"github.com/smartcontractkit/integrations-framework/config"

. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"

Expand All @@ -20,14 +21,15 @@ func GinkgoSuite() {
fConf, err := config.LoadFrameworkConfig(filepath.Join(TestsDir, "framework.yaml"))
if err != nil {
log.Fatal().
Str("Path", ProjectRoot).
Str("Path", TestsDir).
Err(err).
Msg("Failed to load config")
return
}
_, err = config.LoadNetworksConfig(filepath.Join(TestsDir, "networks.yaml"))
if err != nil {
log.Fatal().
Str("Path", ProjectRoot).
Str("Path", TestsDir).
Err(err).
Msg("Failed to load config")
return
Expand Down

0 comments on commit 77c4901

Please sign in to comment.