Skip to content
This repository has been archived by the owner on Mar 23, 2022. It is now read-only.

Commit

Permalink
Merge pull request #135 from RaenonX-DL/dev
Browse files Browse the repository at this point in the history
v2.7.0 Release
  • Loading branch information
RaenonX authored Jun 19, 2021
2 parents bcdf95a + ce93640 commit 209fcd5
Show file tree
Hide file tree
Showing 96 changed files with 2,513 additions and 1,006 deletions.
4 changes: 0 additions & 4 deletions .codacy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,3 @@ engines:
exclude_paths:
# Test files
- "**.test.ts"
csslint:
exclude_paths:
# Bootstrap CSS file (auto-generated)
- "src/bootstrap.css"
62 changes: 39 additions & 23 deletions .github/workflows/app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: Node CI
on: [ push ]

env:
# Need to use real backends for cypress testings
NEXT_PUBLIC_API_ROOT: https://dl-back.raenonx.cc
NEXT_PUBLIC_RESOURCE_ROOT: https://raw.githubusercontent.com/RaenonX-DL/dragalia-site-resources/main
NEXT_PUBLIC_DEPOT_ROOT: https://raw.githubusercontent.com/RaenonX-DL/dragalia-data-depot/main
Expand Down Expand Up @@ -49,10 +50,13 @@ jobs:
- name: npm run lint
run: npm run lint

- name: npm run lint
run: npm run lint:css

- name: npm test
run: npm run test -- --coverage

- name: Send Coverage report
- name: Send coverage report
uses: codacy/codacy-coverage-reporter-action@master
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
Expand All @@ -68,14 +72,8 @@ jobs:
PORT: 3000

strategy:
# DO NOT cancel the others if any test failed
# https://github.com/cypress-io/github-action/issues/48
fail-fast: false
matrix:
node-version: [ 14.x ]
browser: [ chrome, firefox ]
# Run 3 cypress copies in parallel
containers: [ 1, 2 ]

steps:
- uses: actions/checkout@v2
Expand All @@ -87,21 +85,39 @@ jobs:
with:
node-version: ${{ matrix.node-version }}

- name: cypress tests
uses: cypress-io/github-action@v2
- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
build: npm run build
start: npm run start
# Configs
browser: ${{ matrix.browser }}
record: true
parallel: true
group: Cypress - ${{ matrix.browser }}
cache-key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
# Boot
wait-on: 'http://localhost:3000'
# npm cache files are stored in `~/.npm` on Linux/macOS
# https://github.com/npm/cli/issues/564#issuecomment-743919613
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: npm ci
run: npm ci

- name: npm run build
run: npm run build
env:
NODE_ENV: production

- name: Cypress tests
run: npm run test:ci
env:
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
# As recommended by the doc
# - https://github.com/cypress-io/github-action#record-test-results-on-cypress-dashboard
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_ENV: production

- name: Upload Cypress failure results
uses: actions/upload-artifact@v2
if: failure()
with:
name: Cypress Results
path: |
.cypress/screenshots
.cypress/videos
if-no-files-found: error
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
# IntelliJ project files
/.idea

# scss files - these should be compiled to css before commmit
*.scss

# dependencies
/node_modules
/.pnp
Expand Down
5 changes: 1 addition & 4 deletions .stylelintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@ plugins:
extends:
- stylelint-config-standard

ignoreFiles:
# Automatically compiled from scss file
- ./src/bootstrap.css

rules:
# Override @ rules
at-rule-no-unknown: null
scss/at-rule-no-unknown: true
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,18 @@

Main | Dev
:---: | :---:
[![front-grade-badge-main]][front-cq-link-main] | [![front-coverage-badge-main]][front-cq-link-main]
[![front-grade-badge-dev]][front-cq-link-dev] | [![front-coverage-badge-dev]][front-cq-link-dev]
[![front-cypress-badge-main]][front-cypress-link] | [![front-cypress-badge-dev]][front-cypress-link]
[![front-grade-badge-main]][front-cq-link-main] | [![front-grade-badge-dev]][front-cq-link-dev]
[![front-coverage-badge-main]][front-cq-link-main] | [![front-coverage-badge-dev]][front-cq-link-dev]

Frontend of [Dragalia Lost info website by OM][front-site].

## Environment Variables

Name | Required/Optional | Description
:---: | :---: | :---:
NEXT_PUBLIC_API_ROOT | Required | Root URL of the backend. This should **not** end with a slash (`/`).
NEXT_PUBLIC_RESOURCE_ROOT | Required | Root URL of the exported resources. This should **not** end with a slash (`/`).
NEXT_PUBLIC_DEPOT_ROOT | Required | Root URL of the data depot. This should **not** end with a slash (`/`).
`NEXT_PUBLIC_API_ROOT` | Required | Root URL of the backend. This should **not** end with a slash (`/`).
`NEXT_PUBLIC_RESOURCE_ROOT` | Required | Root URL of the exported resources. This should **not** end with a slash (`/`).
`NEXT_PUBLIC_DEPOT_ROOT` | Required | Root URL of the data depot. This should **not** end with a slash (`/`).

For the [current deployed website][front-site], `NEXT_PUBLIC_API_ROOT` is `https://dl-back.raenonx.cc`.

Expand Down
Loading

0 comments on commit 209fcd5

Please sign in to comment.