Skip to content

Commit

Permalink
Merge pull request #576 from danactive/typescript
Browse files Browse the repository at this point in the history
feat(Next > TypeScript): Add TypeScript with strict enabled
  • Loading branch information
danactive authored Aug 30, 2023
2 parents 399619b + ee4d886 commit d8f4599
Show file tree
Hide file tree
Showing 175 changed files with 20,204 additions and 39,116 deletions.
110 changes: 110 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
name: CI
on:
push:
branches:
- main
pull_request: {}

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
actions: write
contents: read

jobs:
lint:
name: ESLint
runs-on: ubuntu-latest
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v3

- name: ⎔ Setup node
uses: actions/setup-node@v3
with:
node-version-file: "next/.nvmrc"

- name: 📥 Download deps
uses: bahmutov/npm-install@v1
with:
working-directory: next

- name: Lint
run: npm run lint:ci
working-directory: next

typecheck:
name: TypeScript
runs-on: ubuntu-latest
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v3

- name: ⎔ Setup node
uses: actions/setup-node@v3
with:
node-version-file: "next/.nvmrc"

- name: 📥 Download deps
uses: bahmutov/npm-install@v1
with:
working-directory: next

- name: 🔎 Type check
run: npm run typecheck --if-present
working-directory: next

unittest:
name: Jest
runs-on: ubuntu-latest
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v3

- name: ⎔ Setup node
uses: actions/setup-node@v3
with:
node-version-file: "next/.nvmrc"

- name: 📥 Download deps
uses: bahmutov/npm-install@v1
with:
working-directory: next

- name: Unit Test runner
run: npm run test:ci
working-directory: next
e2etest:
name: Playwright
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v3

- name: ⎔ Setup node
uses: actions/setup-node@v3
with:
node-version-file: "next/.nvmrc"

- name: 📥 Download deps
uses: bahmutov/npm-install@v1
with:
working-directory: next

- name: Install Playwright Browsers
run: npx playwright install --with-deps
working-directory: next

- name: Run Playwright tests
run: npx playwright test
working-directory: next

- uses: actions/upload-artifact@v3
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30
1 change: 0 additions & 1 deletion .github/workflows/visualize_files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
push:
branches:
- main
- master
jobs:
get_data:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Your personal **history** storyboarded with photo and video albums. Associate ph
## Installation

### Development
1. Node.js v16 LTS [Download](https://nodejs.org/)
1. Node.js v18 LTS [Download](https://nodejs.org/)
1. Folder **app** both the backend and frontend using Next.js
1. Install project dependencies `npm ci`
1. Start web server `npm run dev`
Expand Down
2 changes: 1 addition & 1 deletion api/.nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
12.18.1
14.21.3
14 changes: 7 additions & 7 deletions api/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,31 +59,31 @@ To use the administration tools
* Install project dependencies `npm install [module]`

## Photo/video album XML schemas
### Current schema (2.2)
### Current schema (2.0)

Example

<album>
<meta>
<gallery>demo</gallery> <!-- gallery directory name excluding 'gallery-'; new in schema 2.0 -->
<album_name>sample</album_name>
<album_version>2.2</album_version>
<id>sample</id> <!--Filename is album_sample.xml; new in schema 2.0-->
<version>1.8</version> <!--Reference schema version; new in schema 2.0-->
</meta>
<item id="1"><!-- photo -->
<item><!-- photo -->
<id>1</id> <!-- id attribute must be unique for this album; used by JavaScript & for character association -->
<filename>2001-03-21-01.jpg</filename> <!-- must start with YYYY year; photos and thumbs must be places in this folder too -->
<geo> <!-- geocode -->
<lat>49.25</lat> <!-- latitude -->
<lon>-123.1</lon> <!-- longitude -->
<accuracy>14</accuracy> <!-- zoom level to item this indicates not precise -->
</geo>
<photo_city>Vancouver, BC</photo_city> <!-- Political location name often City, Province/State -->
<photo_loc>Granville Island</photo_loc> <!-- General location name often neighourhood or building -->
<photo_desc>An oversized avocado</photo_desc> <!-- The photo description only viewable in the lightbox view -->
<thumb_caption>Lunch</thumb_caption> <!-- Less than three words to descibe the thumbnail in gallery view -->
<search>Photographer name, subject names</search> <!-- keywords for searching, such as persons in the photo -->
</item>
<item id="2"><!-- video -->
<item><!-- video -->
<type>video</type>
<id>1</id> <!-- id attribute must be unique for this album; used by JavaScript & for character association -->
<filename>2012-fireplace.mp4</filename> <!-- History supports both HTML5 video formats for best browser support; must start with YYYY year; photos and thumbs must be places in this folder too -->
<filename>2012-fireplace.webm</filename>
<photo_city>Vancouver, BC</photo_city>
Expand Down
Loading

1 comment on commit d8f4599

@vercel
Copy link

@vercel vercel bot commented on d8f4599 Aug 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

history – ./

history-danactive.vercel.app
history-git-main-danactive.vercel.app
history.domaindesign.ca

Please sign in to comment.