-
Notifications
You must be signed in to change notification settings - Fork 550
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## Type of change - New feature ## Changes The following changes have been made: - Create a ui for the tic tac toe app ## Related Issues Closes #110
- Loading branch information
Showing
71 changed files
with
9,249 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
name: Deploy Contracts | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
provider_url: | ||
description: "Provider url" | ||
required: true | ||
default: "https://beta-5.fuel.network/graphql" | ||
type: string | ||
wallet_secret: | ||
description: "Wallet secret used to deploy contracts" | ||
required: true | ||
type: string | ||
gas_price: | ||
description: "Min gas price required from the provider" | ||
required: true | ||
default: 1 | ||
type: number | ||
commit_changes: | ||
description: "Commit contract ids on the current branch" | ||
required: true | ||
default: true | ||
type: boolean | ||
|
||
env: | ||
RUST_VERSION: 1.74.0 | ||
NODE_VERSION: 18 | ||
PNPM_VERSION: 8 | ||
WALLET_SECRET: ${{ github.event.inputs.wallet_secret }} | ||
PROVIDER_URL: ${{ github.event.inputs.provider_url }} | ||
GAS_PRICE: ${{ github.event.inputs.gas_price }} | ||
|
||
jobs: | ||
cancel-previous-run: | ||
name: Cancel previous actions | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: n1hility/cancel-previous-runs@v2 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
test-inputs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check provider_url format | ||
run: | | ||
if ! [[ "${{ github.event.inputs.provider_url }}" =~ ^https?:\/\/([a-z0-9\.-]){1,}(:[0-9]{1,4})?\/graphql$ ]]; then | ||
echo "Provider url is not valid"; | ||
process 1; | ||
fi | ||
shell: bash | ||
|
||
build-and-deploy: | ||
needs: test-inputs | ||
name: Build and deploy contracts | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
project: ["games/TicTacToe/frontend-app"] | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install rust toolchain | ||
uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: ${{ env.RUST_VERSION }} | ||
|
||
- name: Install Fuel toolchain | ||
uses: FuelLabs/action-fuel-toolchain@v0.6.0 | ||
with: | ||
toolchain: nightly | ||
date: 2024-01-24 | ||
|
||
- name: PNPM install | ||
id: pnpm-cache | ||
run: | | ||
cd ${{ matrix.project }} | ||
pnpm recursive install --frozen-lockfile | ||
- name: Build contracts | ||
run: | | ||
cd ${{ matrix.project }} | ||
pnpm fuels build | ||
- name: Deploy contracts | ||
run: | | ||
cd ${{ matrix.project }} | ||
pnpm fuels deploy | ||
env: | ||
NODE_ENV: production | ||
|
||
- name: Commit new contract ids | ||
if: ${{ github.event.inputs.commit_changes && github.ref != 'refs/heads/master' }} | ||
uses: EndBug/add-and-commit@v9 | ||
with: | ||
message: "chore: update contract ids" | ||
add: ${{ matrix.project }}/production-contract/contract-ids.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,7 @@ | |
|
||
# These are backup files generated by rustfmt | ||
**/*.rs.bk | ||
|
||
node_modules | ||
.turbo | ||
dist |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
VITE_NODE_ENV=production |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
|
||
**/node_modules/ | ||
**/coverage/ | ||
*.js | ||
*.html | ||
dist | ||
CHANGELOG.md | ||
src/contract-types | ||
contracts | ||
**/*.typegen.ts | ||
.eslintrc.js | ||
**/__generated__/ | ||
**/generated/* | ||
.changeset/**.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"extends": ["plugin:@fuels/base"], | ||
"rules": { | ||
"import/prefer-default-export": "off", | ||
"import/no-named-as-default": "off", | ||
"import/export": "off", | ||
"import/default": "off", | ||
"no-console": "error", | ||
"@typescript-eslint/no-empty-function": "off", | ||
"jsx-a11y/alt-text": "off" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
pnpm-debug.log* | ||
lerna-debug.log* | ||
|
||
node_modules | ||
dist | ||
dist-ssr | ||
*.local | ||
.env | ||
.fuels | ||
|
||
# Editor directories and files | ||
.vscode/* | ||
!.vscode/extensions.json | ||
.idea | ||
.DS_Store | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln | ||
*.sw? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
.coverage_* | ||
.github | ||
CHANGELOG.md | ||
coverage | ||
dist | ||
dist-crx | ||
node_modules | ||
pnpm-lock.yaml | ||
**/*.typegen.ts | ||
.next | ||
**/storybook/**/* | ||
**/__generated__/ | ||
**/generated/ | ||
.changeset/**.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
const fuelPrettierConfig = require('@fuels/prettier-config'); | ||
|
||
/** @type {import("prettier").Config} */ | ||
module.exports = { | ||
...fuelPrettierConfig, | ||
// trailingComma always adds comma on the end of functions params, that can cause | ||
// issues, when a second param can't be undefined. | ||
trailingComma: 'es5', | ||
}; |
Oops, something went wrong.