Skip to content

Commit

Permalink
build: 🚀 implement new build system
Browse files Browse the repository at this point in the history
Closes #487, #66, #231, #57
  • Loading branch information
ChildishGiant committed Apr 25, 2021
1 parent bf17006 commit 8cfbbf1
Show file tree
Hide file tree
Showing 269 changed files with 24,524 additions and 15,594 deletions.
53 changes: 0 additions & 53 deletions .eslintrc.json

This file was deleted.

6 changes: 3 additions & 3 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# These are supported funding model platforms
ko_fi: childishgiant
github: childishgiant
# These are supported funding model platforms
ko_fi: childishgiant
github: childishgiant
78 changes: 39 additions & 39 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,40 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: Bug
assignees: ''

---

<!-- Try to fill this out as much as you can but don't worry if you can't -->

**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]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]

**Additional context**
Add any other context about the problem here.

---
name: Bug report
about: Create a report to help us improve
title: ''
labels: Bug
assignees: ''

---

<!-- Try to fill this out as much as you can but don't worry if you can't -->

**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]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]

**Additional context**
Add any other context about the problem here.

<!-- Thanks for taking the time to contribute to Cloverleaf :) -->
48 changes: 24 additions & 24 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: New Feature
assignees: ''

---

<!-- Try to fill this out as much as you can but don't worry if you can't -->

**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.

<!-- Thanks for taking the time to contribute to Cloverleaf :) -->
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: New Feature
assignees: ''

---

<!-- Try to fill this out as much as you can but don't worry if you can't -->

**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.

<!-- Thanks for taking the time to contribute to Cloverleaf :) -->
36 changes: 18 additions & 18 deletions .github/ISSUE_TEMPLATE/preset-request.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
---
name: Preset request
about: Suggest an app or service for a preset
title: ''
labels: Preset
assignees: ''

---

<!-- Try to fill this out as much as you can but don't worry if you can't -->

**App/Service name**:

**Link to App/Service**:

**Password requirements (If known)**:

<!-- Thanks for taking the time to contribute to Cloverleaf :) -->
---
name: Preset request
about: Suggest an app or service for a preset
title: ''
labels: Preset
assignees: ''

---

<!-- Try to fill this out as much as you can but don't worry if you can't -->

**App/Service name**:

**Link to App/Service**:

**Password requirements (If known)**:

<!-- Thanks for taking the time to contribute to Cloverleaf :) -->
20 changes: 10 additions & 10 deletions .github/ISSUE_TEMPLATE/question.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
name: Question
about: Ask a question about Cloverleaf
title: ''
labels: Question
assignees: ''

---

<!-- What do you want to know or need help with? -->
---
name: Question
about: Ask a question about Cloverleaf
title: ''
labels: Question
assignees: ''

---

<!-- What do you want to know or need help with? -->
28 changes: 14 additions & 14 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
version: 2
updates:
- package-ecosystem: npm
directory: "/"
schedule:
interval: daily
labels:
- "dependencies"
open-pull-requests-limit: 10
target-branch: dev
ignore:
- dependency-name: exports-loader
versions:
- "> 0.7.0"
version: 2
updates:
- package-ecosystem: npm
directory: "/"
schedule:
interval: daily
labels:
- "dependencies"
open-pull-requests-limit: 10
target-branch: dev
ignore:
- dependency-name: exports-loader
versions:
- "> 0.7.0"
110 changes: 62 additions & 48 deletions .github/workflows/main.yml → .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,48 +1,62 @@
name: CI
on: [push, pull_request]
jobs:
build:

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Get secrets
run: |
cd config
mkdir secrets
echo "${{ secrets.crowdin_key }}" > secrets/crowdin_key.txt
- name: Webpack build
run: |
npm i
npm run-script build
- name: Start server
run: npx http-server --port 8080 &

- name: Audit URLs using Lighthouse
uses: treosh/lighthouse-ci-action@v3
with:
urls: http://localhost:8080/
uploadArtifacts: true # save results as an action artifacts
temporaryPublicStorage: true # upload lighthouse report to the temporary storage
runs: 3 # Asserting against a single run can lead to flaky performance assertions

- name: Install dependencies
run: |
cd unit_tests
# sudo apt-get install xvfb firefox
python3 -m pip install -r requirements.txt
- name: Gecko setup
run: |
wget https://github.com/mozilla/geckodriver/releases/download/v0.24.0/geckodriver-v0.24.0-linux64.tar.gz
sudo sh -c 'tar -x geckodriver -zf geckodriver-v0.24.0-linux64.tar.gz -O > /usr/bin/geckodriver'
sudo chmod +x /usr/bin/geckodriver
rm geckodriver-v0.24.0-linux64.tar.gz
export PATH=$PATH:/usr/bin/geckodriver
- name: Test with pytest
run: |
cd unit_tests
python3 -m pytest -s
name: Publish
on:
push:
branches:
- main
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Get secrets
run: |
cd config
mkdir secrets
echo "${{ secrets.crowdin_key }}" > secrets/crowdin_key.txt
- name: esbuild
run: |
npm i
npm run-script build
# Remove gitignore rule for public folder
sed -i 's/public\///' .gitignore
- name: Start server
run: |
cd public
npx http-server --port 8080 &
- name: Audit URLs using Lighthouse
uses: treosh/lighthouse-ci-action@v3
with:
urls: http://localhost:8080/
uploadArtifacts: true # save results as an action artifacts
temporaryPublicStorage: true # upload lighthouse report to the temporary storage
runs: 3 # Asserting against a single run can lead to flaky performance assertions

- name: Install dependencies
run: |
cd unit_tests
# sudo apt-get install xvfb firefox
python3 -m pip install -r requirements.txt
- name: Gecko setup
run: |
wget https://github.com/mozilla/geckodriver/releases/download/v0.24.0/geckodriver-v0.24.0-linux64.tar.gz
sudo sh -c 'tar -x geckodriver -zf geckodriver-v0.24.0-linux64.tar.gz -O > /usr/bin/geckodriver'
sudo chmod +x /usr/bin/geckodriver
rm geckodriver-v0.24.0-linux64.tar.gz
export PATH=$PATH:/usr/bin/geckodriver
- name: Test with pytest
run: |
cd unit_tests
python3 -m pytest -s
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'
Loading

0 comments on commit 8cfbbf1

Please sign in to comment.