Skip to content

Commit

Permalink
Merge branch 'lapce-master'
Browse files Browse the repository at this point in the history
  • Loading branch information
creeper-0910 committed Mar 2, 2023
2 parents 22f2322 + adccb88 commit 07ea873
Show file tree
Hide file tree
Showing 391 changed files with 56,581 additions and 17,880 deletions.
9 changes: 9 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Auto detect text files and perform normalization
* text=auto eol=lf

*.rs text diff=rust eol=lf
*.toml text diff=toml eol=lf
Cargo.lock text eol=lf

*.sh text eol=lf
*.ps1 text eol=crlf
29 changes: 29 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: 'C-bug'
assignees: ''

---

## Lapce Version

The Lapce version you are using, which can be found in "About Lapce" at the top right settings icon.

## System information

the operating system used, including its version, e.g. Windows 10, Ubuntu 18.04

## Describe the bug
A clear and concise description of what the bug is.

## Additional information

Other information that can be used to further reproduce or isolate the problem.
This commonly includes:

- screenshots
- logs
- theories about what might be going wrong
- workarounds that you used
11 changes: 11 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
blank_issues_enabled: false
contact_links:
- name: Lapce community on Discord
url: https://discord.gg/n8tGJ6Rn6D
about: Please ask and answer questions here.
- name: Lapce community on Matrix
url: https://matrix.to/#/#lapce-editor:matrix.org
about: Please ask and answer questions here.
- name: Lapce documentation
url: https://docs.lapce.dev/
about: Documentation for Lapce
24 changes: 24 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: 'C-feature'
assignees: ''

---

## Is your feature request related to a problem? Please describe.

A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

## Describe the solution you'd like

A clear and concise description of what you want to happen.

## Describe alternatives you've considered

A clear and concise description of any alternative solutions or features you've considered.

## Additional context

Add any other context or screenshots about the feature request here.
1 change: 1 addition & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- [ ] Added an entry to `CHANGELOG.md` if this change could be valuable to users
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: 2
updates:
- package-ecosystem: 'github-actions'
directory: '/'
schedule:
interval: 'weekly'

- package-ecosystem: 'cargo'
directory: '/'
schedule:
interval: 'weekly'
112 changes: 69 additions & 43 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,75 +2,101 @@ on:
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened, ready_for_review]

name: CI

concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true

jobs:
build:
name: Rust (${{ matrix.toolchain }}) on ${{ matrix.os }}
name: Rust on ${{ matrix.os }}
if: github.event.pull_request.draft == false
needs: [fmt, clippy]
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]
toolchain: [ stable ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Checkout repo
uses: actions/checkout@v3

- name: Install dependencies on Ubuntu
if: startsWith(matrix.os, 'ubuntu')
run: sudo apt-get update && sudo apt-get install cmake pkg-config libgtk-3-dev

- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.toolchain }}
- name: Update toolchain & add llvm-tools
run: |
rustup update
rustup component add llvm-tools-preview
- uses: Swatinem/rust-cache@v1
- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2

- name: Fetch dependencies
run: cargo fetch --locked

- name: Build
uses: actions-rs/cargo@v1
with:
command: build

- name: Run tests
uses: actions-rs/cargo@v1
run: cargo build --frozen

- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov

- name: Run tests and coverage
run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info

- name: Run doc tests
run: cargo test --doc --workspace

- name: Upload coverage
uses: codecov/codecov-action@v3
with:
command: test
args: --workspace
files: lcov.info

fmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- run: rustup component add rustfmt
- uses: Swatinem/rust-cache@v1
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- name: Checkout repo
uses: actions/checkout@v3

- name: Update toolchain & add rustfmt
run: |
rustup update
rustup component add rustfmt
- name: Run rustfmt
run: cargo fmt --all --check

clippy:
name: Clippy
runs-on: ubuntu-latest
name: Clippy on ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- run: rustup component add clippy
- name: Checkout repo
uses: actions/checkout@v3

- name: Update toolchain & add clippy
run: |
rustup update
rustup component add clippy
- name: Install dependencies on Ubuntu
if: startsWith(matrix.os, 'ubuntu')
run: sudo apt-get update && sudo apt-get install cmake pkg-config libgtk-3-dev
- uses: Swatinem/rust-cache@v1
- uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings

- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2

- name: Fetch dependencies
run: cargo fetch --locked

- name: Run clippy
run: cargo clippy -- -D warnings
69 changes: 0 additions & 69 deletions .github/workflows/pr.yml

This file was deleted.

Loading

0 comments on commit 07ea873

Please sign in to comment.