Skip to content

Commit

Permalink
e2e (#324)
Browse files Browse the repository at this point in the history
* fixed action.yml

* updated .gitignore

* added scripts to build package, run e2e tests and updated dependencies

* made action argument a service and executed it in the action runner to parse input

* fixed bug in getting nodes to checkout and added artifact name validator

* improved logging in checkout service

* changed logging from info to debugging for regex-command-treatment

* getCloneUrl returns a path to the local repository when running e2e tests

* fixed bug in git version and clone

* improved error msg in getForkName

* configure octokit to use proxy if defined

* improved logging and annotations during flow execution

* improved logging for pre and post

* updated test cases

* added e2e tests for single pr flow

* fixed clone case

* added helper to enable disable easy logging

* added cross-pr tests

* updated dependencies file and single pr tests

* allow unrelated history merge

* updated gitignore and package.json

* added full downstream tests

* updated other e2e tests with comments and simplifications

* trimmed white spaces from additional-flag input

* added branch e2e tests

* added e2e pr checks

* increase test timeout limit

Co-authored-by: Github <noreply@github.com>
  • Loading branch information
shubhbapna and web-flow committed Dec 20, 2022
1 parent 7bc0319 commit b504297
Show file tree
Hide file tree
Showing 33 changed files with 3,909 additions and 72 deletions.
19 changes: 18 additions & 1 deletion .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ name: Pull Request Checks
on: pull_request

jobs:
build:
unit:
strategy:
matrix:
node-version: [14.x, 16.x]
Expand All @@ -22,3 +22,20 @@ jobs:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm run test:report

e2e:
strategy:
matrix:
node-version: [14.x, 16.x]
os: [ubuntu-latest]
fail-fast: false
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run test:e2e
7 changes: 4 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ node_modules/
locally_execution/**/*
test/**/_temp/**/*
build_chain_20*/**/*
yarn.lock
/project-dependencies.yaml
coverage/
test-report.xml
.idea/
.vscode/
.vscode/
dist/
build/
*.log
8 changes: 4 additions & 4 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,21 @@ inputs:
required: false
skip-execution:
description: "skips execution and artifacts archiving for all projects. Overrides skip-project-execution"
default: false
default: "false"
required: false
skip-project-execution:
description: "skips execution and artifacts archiving for certain projects"
required: false
skip-checkout:
description: "Skip checkout for all projects. Overrides skip-project-checkout"
default: false
default: "false"
required: false
skip-project-checkout:
description: "A list of projects to skip checkout"
required: false
skip-parallel-checkout:
description: "Checkout the project sequentially or parallely"
default: false
default: "false"
required: false
custom-command-treatment:
description: "<RegEx||ReplacementEx> Regex defines the regular expression for what you want to replace with the ReplacementEx"
Expand All @@ -45,7 +45,7 @@ inputs:
description: "The prefix to identify the annotations for different jobs running for the same Action"
required: false
runs:
using: "node14"
using: "node16"
main: "dist/index.js"
branding:
icon: "box"
Expand Down
3 changes: 2 additions & 1 deletion jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ const jestConfig: Config.InitialOptions = {
},
clearMocks: true,
resetMocks: true,
coveragePathIgnorePatterns: ["<rootDir>/node_modules/", "<rootDir>/test/"]
coveragePathIgnorePatterns: ["<rootDir>/node_modules/", "<rootDir>/test/"],
testTimeout: 120000
};
export default jestConfig;

0 comments on commit b504297

Please sign in to comment.