Skip to content

Commit

Permalink
chore: push new release (#4)
Browse files Browse the repository at this point in the history
* feat: download link will now get the user's OS automatically (#2)

* chore: setup ci (#3)
  • Loading branch information
corp-0 authored Sep 15, 2022
1 parent d486065 commit 8817bd3
Show file tree
Hide file tree
Showing 46 changed files with 16,663 additions and 8,485 deletions.
File renamed without changes.
41 changes: 41 additions & 0 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
on:
pull_request:
branches:
- master
- develop
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18.x
- run: npm install
- run: npm run lint
# unit_test:
# runs-on: ubuntu-latest
# needs: [lint]
# steps:
# - uses: actions/checkout@v3
# - uses: actions/setup-node@v3
# with:
# node-version: 18.x
# - run: npm install
# - name: build
# run: npm run build
# - name: unit test
# run: npm run test:unit
e2e_test:
runs-on: ubuntu-latest
needs: [lint]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18.x
- run: npm install
- name: build
run: npm run build
- name: e2e testing
run: npm run test:e2e
56 changes: 56 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
on:
push:
branches:
- master
- develop
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18.x
- run: npm install
- run: npm run lint
# unit_test:
# runs-on: ubuntu-latest
# needs: [lint]
# steps:
# - uses: actions/checkout@v3
# - uses: actions/setup-node@v3
# with:
# node-version: 18.x
# - run: npm install
# - name: build
# run: npm run build
# - name: unit test
# run: npm run test:unit
e2e_test:
runs-on: ubuntu-latest
needs: [lint]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18.x
- run: npm install
- name: build
run: npm run build
- name: unit test
run: npm run test:e2e
release:
runs-on: ubuntu-latest
needs: [lint, e2e_test]
if: github.ref == 'refs/heads/master'
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Semantic Release
uses: cycjimmy/semantic-release-action@v3
with:
extra_plugins: |
@semantic-release/changelog@3.0.0
@semantic-release/git
env:
GITHUB_TOKEN: ${{ secrets.SEMANTIC_RELEASE }}
62 changes: 30 additions & 32 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,42 +1,40 @@
# Logs
logs
*.log
npm-debug.log*

# Runtime data
pids
*.pid
*.seed
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# dependencies
/node_modules
/.pnp
.pnp.js

# Coverage directory used by tools like istanbul
coverage
# testing
/coverage

# nyc test coverage
.nyc_output
# next.js
/.next/
/out/

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# production
/build

# node-waf configuration
.lock-wscript
# misc
.DS_Store
*.pem

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release
# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*

# Dependency directories
node_modules
jspm_packages
# local env files
.env*.local

# Optional npm cache directory
.npm
# vercel
.vercel

# Optional REPL history
.node_repl_history
.next
# typescript
*.tsbuildinfo
next-env.d.ts

# IDE
.idea/
.vscode/
# cypress
/cypress/videos
/cypress/screenshots
5 changes: 5 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions .idea/codeStyles/codeStyleConfig.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions .idea/discord.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions .idea/unitystation-web.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions .idea/webResources.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions .releaserc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"branches": ["master"],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/changelog",
["@semantic-release/git", {
"assets": ["CHANGELOG.md"],
"message": "docs(changelog): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}],
"@semantic-release/github"
]
}
35 changes: 34 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,34 @@
"# unitystation-web"
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).

## Getting Started

First, run the development server:

```bash
npm run dev
# or
yarn dev
```

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.

You can start editing the page by modifying `pages/index.tsx`. The page auto-updates as you edit the file.

[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.ts`.

The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages.

## Learn More

To learn more about Next.js, take a look at the following resources:

- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.

You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!

## Deploy on Vercel

The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.

Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,10 +1,20 @@
import Button from '../button';

const downloadLink = 'https://github.com/unitystation/stationhub/releases';
import getDownloadLink from '../../lib/platform';
const githubUrl = 'https://github.com/unitystation/unitystation';
const discordInviteUrl = 'https://discord.com/invite/tFcTpBp';
const githubReleases = 'https://github.com/unitystation/stationhub/releases/latest';

import {useEffect, useState} from 'react';



const LandingButtons = () => {
const [downloadLink, setDownloadLink] = useState(githubReleases);

useEffect(() => {
getDownloadLink().then((link) => setDownloadLink(link));
}, []);

return (<div className={'flex flex-wrap justify-center mt-8 gap-4'}>
<Button filled={true} text={'Download'} linkTo={downloadLink}/>
<Button filled={false} text={'Github'} linkTo={githubUrl}/>
Expand Down
File renamed without changes.
File renamed without changes.
17 changes: 17 additions & 0 deletions cypress.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { defineConfig } from "cypress";

export default defineConfig({
e2e: {
baseUrl: 'http://localhost:3000',
setupNodeEvents(on, config) {
// implement node event listeners here
},
},

component: {
devServer: {
framework: "next",
bundler: "webpack",
},
},
});
7 changes: 7 additions & 0 deletions cypress/component/dummy.cy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
describe("Just a dummy test", () => {
it("Should pass", () => {
expect(true).to.be.true;
})
});

export {};
7 changes: 7 additions & 0 deletions cypress/e2e/home.cy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
describe("Home page test", () => {
it("Should visit home page", () => {
cy.visit("/");
});
})

export {};
5 changes: 5 additions & 0 deletions cypress/fixtures/example.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"name": "Using fixtures to represent data",
"email": "hello@cypress.io",
"body": "Fixtures are a great way to mock data for responses to routes"
}
37 changes: 37 additions & 0 deletions cypress/support/commands.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/// <reference types="cypress" />
// ***********************************************
// This example commands.ts shows you how to
// create various custom commands and overwrite
// existing commands.
//
// For more comprehensive examples of custom
// commands please read more here:
// https://on.cypress.io/custom-commands
// ***********************************************
//
//
// -- This is a parent command --
// Cypress.Commands.add('login', (email, password) => { ... })
//
//
// -- This is a child command --
// Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... })
//
//
// -- This is a dual command --
// Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... })
//
//
// -- This will overwrite an existing command --
// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... })
//
// declare global {
// namespace Cypress {
// interface Chainable {
// login(email: string, password: string): Chainable<void>
// drag(subject: string, options?: Partial<TypeOptions>): Chainable<Element>
// dismiss(subject: string, options?: Partial<TypeOptions>): Chainable<Element>
// visit(originalFn: CommandOriginalFn, url: string, options: Partial<VisitOptions>): Chainable<Element>
// }
// }
// }
Loading

1 comment on commit 8817bd3

@vercel
Copy link

@vercel vercel bot commented on 8817bd3 Sep 15, 2022

Choose a reason for hiding this comment

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

Please sign in to comment.