From 242e535f93a94d2c2ebbe0597579357129bffbbf Mon Sep 17 00:00:00 2001 From: Ethan Lane Date: Mon, 5 Sep 2022 18:28:41 +0100 Subject: [PATCH] Create github workflows --- .github/ISSUE_TEMPLATE/bug_report.md | 38 +++++++++++++++++++++++ .github/ISSUE_TEMPLATE/epic.md | 16 ++++++++++ .github/ISSUE_TEMPLATE/feature_request.md | 20 ++++++++++++ .github/ISSUE_TEMPLATE/user-story.md | 24 ++++++++++++++ .github/pull_request_template.md | 30 ++++++++++++++++++ .github/workflows/deployment.yml | 28 +++++++++++++++++ .github/workflows/integration.yml | 20 ++++++++++++ .github/workflows/staging.yml | 28 +++++++++++++++++ .github/workflows/testing.yml | 27 ---------------- 9 files changed, 204 insertions(+), 27 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/epic.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md create mode 100644 .github/ISSUE_TEMPLATE/user-story.md create mode 100644 .github/pull_request_template.md create mode 100644 .github/workflows/deployment.yml create mode 100644 .github/workflows/integration.yml create mode 100644 .github/workflows/staging.yml delete mode 100644 .github/workflows/testing.yml diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..f3d5c41 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,38 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: bug +assignees: '' + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Desktop (please complete the following information):** + - OS: [e.g. iOS] + - Browser [e.g. chrome, safari] + - Version [e.g. 22] + +**Smartphone (please complete the following information):** + - Device: [e.g. iPhone6] + - OS: [e.g. iOS8.1] + - Browser [e.g. stock browser, safari] + - Version [e.g. 22] + +**Additional context** +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/epic.md b/.github/ISSUE_TEMPLATE/epic.md new file mode 100644 index 0000000..8dfd3c5 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/epic.md @@ -0,0 +1,16 @@ +--- +name: Epic +about: Agile Epic +title: '' +labels: epic +assignees: '' + +--- + +*Description here* + +## Stories +*Stories linked to this epic* + +## Bugs +*Bugs linked to this epic* diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..11fc491 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,20 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: enhancement +assignees: '' + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. diff --git a/.github/ISSUE_TEMPLATE/user-story.md b/.github/ISSUE_TEMPLATE/user-story.md new file mode 100644 index 0000000..644fad5 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/user-story.md @@ -0,0 +1,24 @@ +--- +name: User Story +about: Agile User Story +title: '' +labels: needs criteria, story +assignees: '' + +--- + +Epic Link: N/A +Story Points: N/A + +--- + +*Description here* + +## Acceptance Criteria +*Add your ACs here* + +## Notes +*Any extra information* + +## Subtasks +*Add technical subtasks here* diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..a773253 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,30 @@ +# Description + +Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change. + +Fixes # (issue) + +## Type of change + +Please delete options that are not relevant. + +- [ ] Bug fix (non-breaking change which fixes an issue) +- [ ] New feature (non-breaking change which adds functionality) +- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) +- [ ] This change requires a documentation update + +# How Has This Been Tested? + +Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration + + +# Checklist: + +- [ ] My code follows the style guidelines of this project +- [ ] I have performed a self-review of my own code +- [ ] I have commented my code, particularly in hard-to-understand areas +- [ ] I have made corresponding changes to the documentation +- [ ] My changes generate no new warnings +- [ ] I have added tests that prove my fix is effective or that my feature works +- [ ] New and existing unit tests pass locally with my changes +- [ ] Any dependent changes have been merged and published in downstream modules \ No newline at end of file diff --git a/.github/workflows/deployment.yml b/.github/workflows/deployment.yml new file mode 100644 index 0000000..d7e85be --- /dev/null +++ b/.github/workflows/deployment.yml @@ -0,0 +1,28 @@ +name: deployment + +on: + push: + branches: + - main + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Build and Test + uses: actions/setup-node@v1 + with: + node-version: 16.x + - run: yarn install --frozen-lockfile + - run: yarn build + - run: yarn test + - name: Deploy Production + uses: D3rHase/ssh-command-action@v0.2.1 + with: + HOST: ${{secrets.HOST}} + PORT: ${{secrets.PORT}} + USER: ${{secrets.USER}} + PRIVATE_SSH_KEY: ${{secrets.PRIVATE_SSH_KEY}} + COMMAND: ${{secrets.PROD_COMMAND}} \ No newline at end of file diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml new file mode 100644 index 0000000..d74e7aa --- /dev/null +++ b/.github/workflows/integration.yml @@ -0,0 +1,20 @@ +name: integration + +on: + push: + branches: + - feature/* + - hotfix/* + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Build and Test + uses: actions/setup-node@v1 + with: + node-version: 16.x + - run: yarn install --frozen-lockfile + - run: yarn build + - run: yarn test \ No newline at end of file diff --git a/.github/workflows/staging.yml b/.github/workflows/staging.yml new file mode 100644 index 0000000..a441cc3 --- /dev/null +++ b/.github/workflows/staging.yml @@ -0,0 +1,28 @@ +name: staging + +on: + push: + branches: + - develop + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Build and Test + uses: actions/setup-node@v1 + with: + node-version: 16.x + - run: yarn install --frozen-lockfile + - run: yarn build + - run: yarn test + - name: Deploy Staging + uses: D3rHase/ssh-command-action@v0.2.1 + with: + HOST: ${{secrets.HOST}} + PORT: ${{secrets.PORT}} + USER: ${{secrets.USER}} + PRIVATE_SSH_KEY: ${{secrets.PRIVATE_SSH_KEY}} + COMMAND: ${{secrets.STAGE_COMMAND}} \ No newline at end of file diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml deleted file mode 100644 index 1f76252..0000000 --- a/.github/workflows/testing.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: Testing - -on: - pull_request: - branches: - - main - - develop - -jobs: - build: - - runs-on: ubuntu-latest - - strategy: - matrix: - node-version: [16.x] - - steps: - - uses: actions/checkout@v2 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node-version }} - - run: yarn install - - run: yarn build - - run: yarn test -