forked from WING-NUS/SSID
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into sibinh/maintenance_mailer
- Loading branch information
Showing
276 changed files
with
51,035 additions
and
1,657 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
--- | ||
name: "♻️ Refactor" | ||
about: Something that needs improving while not changing functionality as documented | ||
here (https://www.ssw.com.au/rules/technical-debt/). If this doesn't look right, | ||
choose a different type. | ||
title: "♻️" | ||
labels: 'Type: Refactor' | ||
assignees: '' | ||
|
||
--- | ||
|
||
<!-- These comments automatically delete --> | ||
<!-- **Tip:** Delete parts that are not relevant --> | ||
<!-- Next to Cc:, @ mention users who should be in the loop --> | ||
Cc: | ||
<!-- add intended user next to **Hi** --> | ||
Hi | ||
|
||
### Pain | ||
<!-- Explain the pain you are experiencing --> | ||
|
||
### What code could be improved? | ||
<!-- Add a link to the area/file that needs refactoring --> | ||
|
||
### Tasks | ||
<!--Add GitHub tasks--> | ||
- [ ] ... | ||
- [ ] ... | ||
|
||
### Acceptance Criteria | ||
<!-- Acceptance Criteria helps to answer the question "How will I know when I'm done with this story?". It defines the requirements that must be met for the story to be completed. See https://www.ssw.com.au/rules/acceptance-criteria --> | ||
|
||
### More Information | ||
<!-- Add any other context here. --> | ||
|
||
### Screenshots | ||
<!-- If applicable, add screenshots to help explain your problem. --> | ||
|
||
Thanks! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
--- | ||
name: "✨ New Feature" | ||
about: Suggest an idea. If this doesn't look right, choose a different type. | ||
title: "✨" | ||
labels: 'Type: Feature' | ||
assignees: '' | ||
|
||
--- | ||
|
||
<!-- These comments automatically delete --> | ||
<!-- **Tip:** Delete parts that are not relevant --> | ||
<!-- Next to Cc:, @ mention users who should be in the loop --> | ||
Cc: | ||
<!-- add intended user next to **Hi** --> | ||
Hi | ||
|
||
### Pain | ||
<!-- Explain the pain you are experiencing --> | ||
|
||
### Suggested Solution | ||
<!-- Describe the solution you'd like --> | ||
|
||
### Tasks | ||
<!--Add GitHub tasks--> | ||
- [ ] ... | ||
- [ ] ... | ||
|
||
### Acceptance Criteria | ||
<!-- Acceptance Criteria helps to answer the question "How will I know when I'm done with this story?". It defines the requirements that must be met for the story to be completed. See https://www.ssw.com.au/rules/acceptance-criteria --> | ||
|
||
### More Information | ||
<!-- Add any other context here. --> | ||
|
||
### Screenshots | ||
<!-- If applicable, add screenshots to help explain your problem. --> | ||
|
||
Thanks! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
--- | ||
name: "\U0001F41B Bug Report" | ||
about: Create a report to help us improve documented here (https://www.ssw.com.au/rules/the-right-way-to-report-bugs-and-give-feedback-suggestions). | ||
If this doesn't look right, choose a different type. | ||
title: "\U0001F41B " | ||
labels: 'Type: Bug' | ||
assignees: '' | ||
|
||
--- | ||
|
||
<!-- These comments automatically delete --> | ||
<!-- **Tip:** Delete parts that are not relevant --> | ||
<!-- Next to Cc:, @ mention users who should be in the loop --> | ||
Cc: | ||
<!-- add intended user next to **Hi** --> | ||
Hi | ||
|
||
### 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. --> | ||
|
||
### Tasks | ||
- [ ] Investigate | ||
- [ ] Fix | ||
|
||
### Acceptance Criteria | ||
<!-- Acceptance Criteria helps to answer the question "How will I know when I'm done with this story?". It defines the requirements that must be met for the story to be completed. See https://www.ssw.com.au/rules/acceptance-criteria --> | ||
|
||
### More Information | ||
<!-- Add any other context about the problem here. --> | ||
|
||
### Environment | ||
- Device: [e.g. iPhone 12] | ||
- Browser: [e.g. chrome, safari] | ||
- OS: [e.g. iOS] | ||
|
||
### Screenshots | ||
<!-- If applicable, add screenshots to help explain your problem. --> | ||
|
||
|
||
Thanks! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
--- | ||
name: "\U0001F477 DevOps" | ||
about: CI/CD and other DevOps concerns e.g. Updating the build, code analysis, test, | ||
deploy, application monitoring etc. If this doesn't look right, choose a different | ||
type. | ||
title: "\U0001F477" | ||
labels: 'Type: DevOps' | ||
assignees: '' | ||
|
||
--- | ||
|
||
<!-- These comments automatically delete --> | ||
<!-- **Tip:** Delete parts that are not relevant --> | ||
<!-- Next to Cc:, @ mention users who should be in the loop --> | ||
Cc: | ||
<!-- add intended user next to **Hi** --> | ||
Hi | ||
|
||
### Pain | ||
<!-- Explain the pain you are experiencing --> | ||
|
||
### Suggested Solution | ||
<!-- Describe the solution you'd like --> | ||
|
||
### Tasks | ||
<!--Add GitHub tasks--> | ||
- [ ] ... | ||
- [ ] ... | ||
|
||
### Acceptance Criteria | ||
<!-- Acceptance Criteria helps to answer the question "How will I know when I'm done with this story?". It defines the requirements that must be met for the story to be completed. See https://www.ssw.com.au/rules/acceptance-criteria --> | ||
|
||
### More Information | ||
<!-- Add any other context here. --> | ||
|
||
### Screenshots | ||
<!-- If applicable, add screenshots to help explain your problem. --> | ||
|
||
Thanks! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
--- | ||
name: "\U0001F4DD Documentation" | ||
about: Updating documentation (e.g. README, Wiki, Guides etc.) as documented here | ||
(https://www.ssw.com.au/rules/awesome-documentation/) If this doesn't look right, | ||
choose a different type. | ||
title: "\U0001F4DD" | ||
labels: 'Type: Documentation' | ||
assignees: '' | ||
|
||
--- | ||
|
||
<!-- These comments automatically delete --> | ||
<!-- **Tip:** Delete parts that are not relevant --> | ||
<!-- Next to Cc:, @ mention users who should be in the loop --> | ||
Cc: | ||
<!-- add intended user next to **Hi** --> | ||
Hi | ||
|
||
### Pain | ||
<!-- Explain the pain you are experiencing --> | ||
|
||
### Suggested Documentation | ||
<!-- Short summary of the documentation that should be added --> | ||
|
||
### Tasks | ||
<!--Add GitHub tasks--> | ||
- [ ] ... | ||
- [ ] ... | ||
|
||
### Acceptance Criteria | ||
<!-- Acceptance Criteria helps to answer the question "How will I know when I'm done with this story?". It defines the requirements that must be met for the story to be completed. See https://www.ssw.com.au/rules/acceptance-criteria --> | ||
|
||
### More Information | ||
<!-- Add any other context here --> | ||
|
||
### Screenshots | ||
<!-- If applicable, add screenshots to help explain your problem. --> | ||
|
||
Thanks! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<!--- Provide a general summary of your changes in the Title above --> | ||
|
||
## Description | ||
<!--- Describe your changes in detail --> | ||
|
||
## Related Issue | ||
<!--- This project only accepts pull requests related to open issues --> | ||
<!--- If suggesting a new feature or change, please discuss it in an issue first --> | ||
<!--- If fixing a bug, there should be an issue describing it with steps to reproduce --> | ||
<!--- Please link to the issue here: --> | ||
|
||
## Motivation and Context | ||
<!--- Why is this change required? What problem does it solve? --> | ||
|
||
## How Has This Been Tested? | ||
<!--- Please describe in detail how you tested your changes. --> | ||
<!--- Include details of your testing environment, and the tests you ran to --> | ||
<!--- see how your change affects other areas of the code, etc. --> | ||
|
||
## Screenshots (if appropriate): | ||
|
||
## Types of changes | ||
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: --> | ||
- [ ] 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 change) | ||
|
||
## Checklist: | ||
<!--- Go over all the following points, and put an `x` in all the boxes that apply. --> | ||
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> | ||
- [ ] My code follows the code style of this project. | ||
- [ ] My change requires a change to the documentation. | ||
- [ ] I have updated the documentation accordingly. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,131 @@ | ||
name: Verify | ||
on: [push, pull_request] | ||
|
||
jobs: | ||
linters: | ||
name: Linters | ||
permissions: write-all | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- run: | | ||
git fetch --no-tags --unshallow --prune origin +refs/heads/*:refs/remotes/origin/* | ||
- name: Setup Ruby and install gems | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
bundler-cache: true | ||
|
||
- name: Run linters | ||
run: | | ||
bundle exec pronto run -c origin/master --exit-code | ||
# bundle exec stylelint | ||
# bundle exec prettier | ||
# bundle exec eslint --fix $(git diff --name-only HEAD | xargs) | ||
env: | ||
PRONTO_PULL_REQUEST_ID: ${{ github.event.pull_request.number }} | ||
PRONTO_GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
# security_checks: | ||
# name: Security checks | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - name: Checkout code | ||
# uses: actions/checkout@v2 | ||
# - run: | | ||
# git fetch --no-tags --prune origin +refs/heads/*:refs/remotes/origin/* | ||
|
||
# - name: Setup Ruby and install gems | ||
# uses: ruby/setup-ruby@v1 | ||
# with: | ||
# bundler-cache: true | ||
|
||
# - name: Run security checks | ||
# run: | | ||
# bundle exec bundler-audit --update | ||
# bundle exec brakeman -q -w2 | ||
tests: | ||
name: Tests | ||
runs-on: ubuntu-latest | ||
services: | ||
mysql: | ||
image: mysql:5.7 | ||
env: | ||
MYSQL_HOST: 127.0.0.1 | ||
MYSQL_USER: root | ||
MYSQL_PASSWORD: root | ||
MYSQL_DATABASE: ssid_test | ||
MYSQL_ROOT_PASSWORD: root | ||
ports: | ||
- "3306:3306" | ||
# options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 | ||
|
||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup Ruby and install gems | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
bundler-cache: true | ||
|
||
# - name: Setup Node | ||
# uses: actions/setup-node@v2 | ||
# with: | ||
# node-version: 16 | ||
# cache: yarn | ||
|
||
- name: Install packages | ||
run: | | ||
yarn install --pure-lockfile | ||
- name: Setup test database | ||
env: | ||
RAILS_ENV: test | ||
DATABASE_PORT: 3306 | ||
DB_HOST: 127.0.0.1 | ||
DB_CONNECTION: mysql | ||
DB_DATABASE: ssid_test | ||
DB_USER: root | ||
DB_PASSWORD: root | ||
run: | | ||
sudo /etc/init.d/mysql start | ||
mysql -e 'CREATE DATABASE ssid_test;' -u root -proot | ||
bundle exec rails db:create | ||
bundle exec rails db:migrate RAILS_ENV=test | ||
bundle exec rails db:seed | ||
- name: Install wkhtmltopdf | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y wkhtmltopdf | ||
- name: Install chrome | ||
id: setup-chrome | ||
uses: browser-actions/setup-chrome@v1 | ||
with: | ||
chrome-version: stable | ||
|
||
- name: Show chrome version | ||
run: | | ||
echo Installed chromium version: ${{ steps.setup-chrome.outputs.chrome-version }} ${{ steps.setup-chrome.outputs.chrome-path }} --version | ||
- name: Setup chromedriver | ||
uses: nanasess/setup-chromedriver@v2 | ||
|
||
- name: Run local server for testing | ||
run: | | ||
bundle exec rails server -d -p 3000 -e test | ||
sleep 5 | ||
- name: Run tests | ||
run: | | ||
bundle exec rspec spec/api_requests/ | ||
bundle exec rspec spec/routes | ||
# bundle exec rspec spec/landing_page_spec.rb | ||
|
||
- name: Coveralls | ||
uses: coverallsapp/github-action@master | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
path-to-lcov: "./coverage/lcov.info" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,3 +41,4 @@ | |
/yarn-error.log | ||
yarn-debug.log* | ||
.yarn-integrity | ||
*.yml |
Oops, something went wrong.