Skip to content

Commit

Permalink
Merge branch 'master' into esdrubal/6336_2
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaBatty authored Aug 23, 2024
2 parents a9d4c38 + 72eb924 commit 60eaef8
Show file tree
Hide file tree
Showing 11 changed files with 130 additions and 74 deletions.
69 changes: 37 additions & 32 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
Expand Down Expand Up @@ -194,7 +194,7 @@ jobs:
- name: Run mdbook build
uses: peaceiris/actions-mdbook@v1
with:
mdbook-version: '0.4.25'
mdbook-version: "0.4.25"
- name: Emit book logs to tmp.txt, fail if build logs contain 'ERROR'
run: |
MDBOOK_preprocessor__FORC_documenter__STRICT="true" mdbook build docs/book 2>&1 | tee tmp.txt
Expand Down Expand Up @@ -243,6 +243,7 @@ jobs:
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUST_VERSION }}
targets: wasm32-unknown-unknown
- uses: Swatinem/rust-cache@v2
- name: Install Forc
run: cargo install --locked --debug --path ./forc
Expand All @@ -257,6 +258,8 @@ jobs:
# run: (cd test-proj && forc test)
- name: Install cargo-generate
run: cargo install --locked cargo-generate
- name: Install fuel-core
run: cargo install --locked fuel-core-bin
- name: Generate Rust Integration Tests
run: (cd test-proj && cargo generate --init --path ../templates/sway-test-rs --name test-proj)
- name: Update project cargo manifest with workspace
Expand All @@ -276,10 +279,10 @@ jobs:
with:
toolchain: ${{ env.RUST_VERSION }}
- uses: Swatinem/rust-cache@v2
- name: 'Build Workspace'
- name: "Build Workspace"
run: cargo build --locked --workspace --all-features --all-targets
env:
RUSTFLAGS: '-D warnings'
RUSTFLAGS: "-D warnings"

cargo-clippy:
runs-on: ubuntu-latest
Expand All @@ -306,7 +309,7 @@ jobs:
uses: baptiste0928/cargo-install@v1
with:
crate: cargo-toml-lint
version: '0.1'
version: "0.1"
- name: Run Cargo.toml linter
run: git ls-files | grep Cargo.toml$ | grep -v 'templates/' | xargs --verbose -n 1 cargo-toml-lint

Expand Down Expand Up @@ -341,7 +344,7 @@ jobs:
mv fuel-core-${{ needs.get-fuel-core-version.outputs.fuel_core_version }}-x86_64-unknown-linux-gnu/fuel-core /usr/local/bin/fuel-core
- name: Cargo Run E2E Tests (Fuel VM)
run: |
fuel-core run --db-type in-memory --debug &
fuel-core run --db-type in-memory --debug &
sleep 5 &&
cargo run --locked --release --bin test -- --locked
Expand All @@ -364,7 +367,7 @@ jobs:
mv fuel-core-${{ needs.get-fuel-core-version.outputs.fuel_core_version }}-x86_64-unknown-linux-gnu/fuel-core /usr/local/bin/fuel-core
- name: Cargo Run E2E Tests (Fuel VM)
run: |
fuel-core run --db-type in-memory --debug &
fuel-core run --db-type in-memory --debug &
sleep 5 &&
cargo run --locked --release --bin test -- --locked --release
Expand Down Expand Up @@ -446,8 +449,8 @@ jobs:
run: ./benchmark.sh --prepare-for-commit
- uses: EndBug/add-and-commit@v9
with:
cwd: './performance-data'
message: 'Updated benchmark data'
cwd: "./performance-data"
message: "Updated benchmark data"
default_author: github_actions

forc-unit-tests:
Expand Down Expand Up @@ -546,6 +549,8 @@ jobs:
toolchain: ${{ env.RUST_VERSION }}
- uses: Swatinem/rust-cache@v2
- name: Run sway-lsp tests sequentially
env:
RUST_BACKTRACE: full
run: cargo test --locked --release -p sway-lsp -- --nocapture --test-threads=1
cargo-test-workspace:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -598,10 +603,10 @@ jobs:
with:
status: ${{ job.status }}
token: ${{ secrets.GITHUB_TOKEN }}
notification_title: '{workflow} has {status_message}'
message_format: '{emoji} *{workflow}* {status_message} in <{repo_url}|{repo}> : <{run_url}|View Run Results>'
footer: ''
notify_when: 'failure'
notification_title: "{workflow} has {status_message}"
message_format: "{emoji} *{workflow}* {status_message} in <{repo_url}|{repo}> : <{run_url}|View Run Results>"
footer: ""
notify_when: "failure"
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_NOTIFY_BUILD }}

Expand All @@ -625,7 +630,7 @@ jobs:
./.github/workflows/scripts/verify_tag.sh ${{ github.ref_name }} forc/Cargo.toml
./.github/workflows/scripts/verify_tag.sh ${{ github.ref_name }} forc-pkg/Cargo.toml
./.github/workflows/scripts/verify_tag.sh ${{ github.ref_name }} forc-plugins/forc-client/Cargo.toml
./.github/workflows/scripts/verify_tag.sh ${{ github.ref_name }} forc-plugins/forc-debug/Cargo.toml
./.github/workflows/scripts/verify_tag.sh ${{ github.ref_name }} forc-plugins/forc-debug/Cargo.toml
./.github/workflows/scripts/verify_tag.sh ${{ github.ref_name }} forc-plugins/forc-doc/Cargo.toml
./.github/workflows/scripts/verify_tag.sh ${{ github.ref_name }} forc-plugins/forc-fmt/Cargo.toml
./.github/workflows/scripts/verify_tag.sh ${{ github.ref_name }} forc-plugins/forc-lsp/Cargo.toml
Expand All @@ -651,10 +656,10 @@ jobs:
with:
status: ${{ job.status }}
token: ${{ secrets.GITHUB_TOKEN }}
notification_title: '{workflow} has {status_message}'
message_format: '{emoji} *{workflow}* {status_message} in <{repo_url}|{repo}> : <{run_url}|View Run Results>'
footer: ''
notify_when: 'failure'
notification_title: "{workflow} has {status_message}"
message_format: "{emoji} *{workflow}* {status_message} in <{repo_url}|{repo}> : <{run_url}|View Run Results>"
footer: ""
notify_when: "failure"
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_NOTIFY_BUILD }}

Expand Down Expand Up @@ -701,10 +706,10 @@ jobs:
with:
status: ${{ job.status }}
token: ${{ secrets.GITHUB_TOKEN }}
notification_title: '{workflow} has {status_message}'
message_format: '{emoji} *{workflow}* {status_message} in <{repo_url}|{repo}> : <{run_url}|View Run Results>'
footer: ''
notify_when: 'failure'
notification_title: "{workflow} has {status_message}"
message_format: "{emoji} *{workflow}* {status_message} in <{repo_url}|{repo}> : <{run_url}|View Run Results>"
footer: ""
notify_when: "failure"
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_NOTIFY_BUILD }}

Expand Down Expand Up @@ -778,10 +783,10 @@ jobs:
with:
status: ${{ job.status }}
token: ${{ secrets.GITHUB_TOKEN }}
notification_title: '{workflow} has {status_message}'
message_format: '{emoji} *{workflow}* {status_message} in <{repo_url}|{repo}> : <{run_url}|View Run Results>'
footer: ''
notify_when: 'failure'
notification_title: "{workflow} has {status_message}"
message_format: "{emoji} *{workflow}* {status_message} in <{repo_url}|{repo}> : <{run_url}|View Run Results>"
footer: ""
notify_when: "failure"
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_NOTIFY_BUILD }}

Expand Down Expand Up @@ -833,10 +838,10 @@ jobs:
with:
status: ${{ job.status }}
token: ${{ secrets.GITHUB_TOKEN }}
notification_title: '{workflow} has {status_message}'
message_format: '{emoji} *{workflow}* {status_message} in <{repo_url}|{repo}> : <{run_url}|View Run Results>'
footer: ''
notify_when: 'failure'
notification_title: "{workflow} has {status_message}"
message_format: "{emoji} *{workflow}* {status_message} in <{repo_url}|{repo}> : <{run_url}|View Run Results>"
footer: ""
notify_when: "failure"
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_NOTIFY_BUILD }}

Expand Down Expand Up @@ -881,13 +886,13 @@ jobs:
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
key: '${{ matrix.job.target }}'
key: "${{ matrix.job.target }}"

- name: Use Cross
uses: baptiste0928/cargo-install@v1
with:
crate: cross
cache-key: '${{ matrix.job.target }}'
cache-key: "${{ matrix.job.target }}"

- name: Build forc binaries
run: |
Expand Down
31 changes: 31 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Fuel Security Policy

Thank you for helping make the Fuel ecosystem safe for everyone. The Fuel team take security bugs very seriously. We appreciate your efforts to responsibly disclose your findings, and will make every effort to acknowledge your contributions.

## Reporting Security Issues

If you believe you have found a security vulnerability in any Fuel-owned repository, please report it to us through coordinated disclosure.

**Please do not report security vulnerabilities through public GitHub issues, discussions, or pull requests.**

Instead, please use the GitHub Security Advisory ["Report a Vulnerability"](https://github.com/FuelLabs/sway/security/advisories/new) tab.

The Fuel team will send a response indicating the next steps in handling your report. After the initial reply to your report, the team will keep you informed of the progress towards a fix and full announcement, and may ask for additional information or guidance.

Please include as much of the information listed below as you can to help us better understand and resolve the issue:

* The type of issue (e.g., buffer overflow, SQL injection, or cross-site scripting)
* Full paths of source file(s) related to the manifestation of the issue
* The location of the affected source code (tag/branch/commit or direct URL)
* Any special configuration required to reproduce the issue
* Step-by-step instructions to reproduce the issue
* Proof-of-concept or exploit code (if possible)
* Impact of the issue, including how an attacker might exploit the issue

This information will help us triage your report more quickly.

Report security bugs in third-party modules to the person or team maintaining the module.

## Non-Security Issues

If the issue is not security-related, please report it publicly by opening a [GitHub Issue](https://github.com/FuelLabs/sway/issues/new).
4 changes: 2 additions & 2 deletions forc-plugins/forc-doc/src/render/search.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ pub(crate) fn generate_searchbar(module_info: &ModuleInfo) -> Box<dyn RenderBox>
const searchbar = document.getElementById("search-input");
const searchForm = document.getElementById("search-form");
searchbar.addEventListener("keyup", function(event) {{
searchForm.dispatchEvent(new Event('submit'));
onSearchFormSubmit(event);
}});
searchbar.addEventListener("search", function(event) {{
searchForm.dispatchEvent(new Event('submit'));
onSearchFormSubmit(event);
}});
function onQueryParamsChange() {{
Expand Down
Loading

0 comments on commit 60eaef8

Please sign in to comment.