-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from dominikwilkowski/rust
New rust engine
- Loading branch information
Showing
25 changed files
with
5,416 additions
and
2,833 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 |
---|---|---|
@@ -1,36 +1,145 @@ | ||
name: Testing | ||
name: Linting & Testing | ||
|
||
on: [push] | ||
defaults: | ||
run: | ||
shell: bash | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'main' | ||
pull_request: | ||
types: [opened, synchronize, reopened, ready_for_review] | ||
branches: | ||
- 'main' | ||
|
||
jobs: | ||
testing: | ||
runs-on: ubuntu-latest | ||
debug: | ||
name: Debugging action on ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: | ||
- ubuntu-latest | ||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Installing tree | ||
run: sudo apt-get -y install tree & which tree | ||
|
||
- name: Listing all files | ||
run: tree -I "target*|.git*" | ||
|
||
|
||
fmt: | ||
name: Running cargo fmt on ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: | ||
- ubuntu-latest | ||
runs-on: ${{ matrix.os }} | ||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Update toolchain & add rustfmt | ||
run: | | ||
rustup update | ||
rustup component add rustfmt | ||
- name: Run rustfmt | ||
run: cargo fmt --all --check | ||
|
||
|
||
check: | ||
name: Running cargo check on ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: | ||
- ubuntu-latest | ||
runs-on: ${{ matrix.os }} | ||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Update toolchain | ||
run: rustup update | ||
|
||
- name: Setup Node | ||
uses: actions/[email protected] | ||
- name: Run check | ||
run: cargo check | ||
|
||
|
||
clippy: | ||
name: Running cargo clippy on ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: | ||
- ubuntu-latest | ||
- macos-latest | ||
- windows-latest | ||
runs-on: ${{ matrix.os }} | ||
env: | ||
CARGO_TERM_COLOR: always | ||
RUSTFLAGS: "-Dwarnings" | ||
|
||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Update toolchain & add clippy | ||
run: | | ||
rustup update | ||
rustup component add clippy | ||
- name: Cache Rust dependencies | ||
uses: Swatinem/rust-cache@v2 | ||
with: | ||
node-version: '12.x' | ||
prefix-key: clippy-v0 | ||
key: clippy-${{ matrix.os }} | ||
|
||
- name: Fetch dependencies | ||
run: cargo fetch --locked | ||
|
||
- name: Get yarn cache | ||
id: yarn-cache | ||
run: echo "::set-output name=dir::$(yarn cache dir)" | ||
- name: Run clippy | ||
run: cargo clippy -- --deny warnings | ||
|
||
- name: Cache dependencies | ||
uses: actions/cache@v2 | ||
|
||
test: | ||
name: Running cargo test on ${{ matrix.os }} | ||
needs: [fmt, check, clippy] | ||
strategy: | ||
matrix: | ||
os: | ||
- ubuntu-latest | ||
- macos-latest | ||
- windows-latest | ||
runs-on: ${{ matrix.os }} | ||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Update toolchain | ||
run: rustup update | ||
|
||
- name: Cache Rust dependencies | ||
uses: Swatinem/rust-cache@v2 | ||
with: | ||
path: ${{ steps.yarn-cache.outputs.dir }} | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
- name: Node version | ||
run: node --version | ||
- name: npm version | ||
run: npm --version | ||
- name: Yarn version | ||
run: yarn --version | ||
|
||
- run: yarn install --frozen-lockfile | ||
- run: yarn test | ||
prefix-key: test-v0 | ||
key: test-${{ matrix.os }} | ||
|
||
- name: Build | ||
run: cargo build | ||
|
||
- name: Run tests | ||
run: cargo test |
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 |
---|---|---|
@@ -1,21 +1,20 @@ | ||
.DS_Store | ||
### Rust template | ||
# Generated by Cargo | ||
# will have compiled files and executables | ||
debug/ | ||
target/ | ||
|
||
# system files | ||
.idea/ | ||
*.sublime-project | ||
*.sublime-workspace | ||
codekit-config.json | ||
*.codekit | ||
node_modules | ||
.sass-cache | ||
.idea | ||
validation-report.json | ||
validation-status.json | ||
npm-debug.log | ||
lerna-debug.log | ||
package-lock.json | ||
.DS_Store | ||
|
||
# These are backup files generated by rustfmt | ||
**/*.rs.bk | ||
|
||
dist/* | ||
coverage/* | ||
__tests__/* | ||
*.log | ||
# MSVC Windows builds of rustc generate these, which store debugging information | ||
*.pdb | ||
|
||
yarn.lock | ||
package-lock.json | ||
# Ignore the main file as it's used for testing | ||
src/main.rs |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.