Skip to content

Commit 6b4cd8e

Browse files
authored
Merge pull request #1 from debs-obrien/initial-files
Initial project setup with configuration and essential files
2 parents ec55640 + 9c2df82 commit 6b4cd8e

File tree

291 files changed

+26305
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

291 files changed

+26305
-0
lines changed

.env.example

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
MOVIES_USERNAME=[email protected]
2+
MOVIES_PASSWORD=12345

.eslintrc.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
2+
module.exports = {
3+
extends: ["next", "next/core-web-vitals"],
4+
rules: {
5+
"@next/next/no-img-element": 0, // TODO: Remove when Image component is updated
6+
"react/display-name": 0,
7+
"no-unused-vars": 1,
8+
"react/no-unknown-property": 0,
9+
"@typescript-eslint/no-floating-promises": 0,
10+
},
11+
};
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Playwright Tests
2+
description: Run Playwright tests on the Movies app
3+
runs:
4+
using: composite
5+
steps:
6+
- name: Install dependencies
7+
run: npm ci
8+
working-directory: /
9+
shell: bash
10+
- name: Install Playwright Browsers
11+
run: npx playwright install --with-deps
12+
working-directory: /
13+
shell: bash
14+
- name: Run Playwright tests
15+
run: npx playwright test
16+
working-directory: /
17+
shell: bash
18+
- uses: actions/upload-artifact@v4
19+
if: always()
20+
with:
21+
name: playwright-report
22+
path: /playwright-report/
23+
retention-days: 30

.github/workflows/deploy.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: Deploy
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
env:
9+
FORCE_COLOR: 2
10+
11+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
12+
permissions:
13+
contents: read
14+
pages: write
15+
id-token: write
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
21+
steps:
22+
- name: Clone repository
23+
uses: actions/checkout@v3
24+
- uses: actions/setup-node@v3
25+
with:
26+
node-version: '18'
27+
- name: Build movies site
28+
run: |
29+
npm ci
30+
npm run build
31+
cp -r out /build/movies
32+
working-directory: /
33+
- name: Upload artifact
34+
uses: actions/upload-pages-artifact@v1
35+
with:
36+
path: ./build
37+
38+
deploy:
39+
environment:
40+
name: github-pages
41+
url: ${{ steps.deployment.outputs.page_url }}
42+
outputs:
43+
page_url: ${{ steps.deployment.outputs.page_url }}
44+
runs-on: ubuntu-latest
45+
needs: build
46+
steps:
47+
- name: Deploy to GitHub Pages
48+
id: deployment
49+
uses: actions/deploy-pages@v1
50+
51+
test:
52+
runs-on: ubuntu-latest
53+
needs: deploy
54+
steps:
55+
- name: Checkout repository
56+
uses: actions/checkout@v3
57+
- uses: actions/setup-node@v3
58+
with:
59+
node-version: '18'
60+
- uses: ./.github/actions/run-movies-tests
61+
env:
62+
BASE_URL: ${{ needs.deploy.outputs.page_url }}/movies/
63+
MOVIES_USERNAME: ${{ secrets.MOVIES_USERNAME }}
64+
MOVIES_PASSWORD: ${{ secrets.MOVIES_PASSWORD }}

.github/workflows/test.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Playwright Tests
2+
3+
on:
4+
push:
5+
branches: [ main, master ]
6+
pull_request:
7+
branches: [ main, master ]
8+
jobs:
9+
test:
10+
timeout-minutes: 60
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- uses: actions/setup-node@v4
15+
with:
16+
node-version: lts/*
17+
- uses: ./.github/actions/run-movies-tests
18+
env:
19+
MOVIES_USERNAME: ${{ secrets.MOVIES_USERNAME }}
20+
MOVIES_PASSWORD: ${{ secrets.MOVIES_PASSWORD }}
21+
ENV: LOCAL

.gitignore

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
node_modules
5+
.pnp
6+
.pnp.js
7+
8+
# testing
9+
/coverage
10+
11+
# next.js
12+
.next/
13+
out/
14+
15+
# production
16+
/build
17+
18+
# misc
19+
.DS_Store
20+
21+
# debug
22+
npm-debug.log*
23+
yarn-debug.log*
24+
yarn-error.log*
25+
26+
# local env files
27+
.env
28+
.env.local
29+
.env.development.local
30+
.env.test.local
31+
.env.production.local
32+
33+
.vscode
34+
test-results/
35+
playwright-report/
36+
blob-report/
37+
playwright/.cache

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
legacy-peer-deps=true # some dependencies are outdated, but we don't want to update them

.prettierignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules
2+
dist

.prettierrc.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"singleQuote": true
3+
}

LICENSE.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2020, 2021 The Movies App authors
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.

0 commit comments

Comments
 (0)