diff --git a/.github/CODEOWNERS b/.forgejo/CODEOWNERS similarity index 100% rename from .github/CODEOWNERS rename to .forgejo/CODEOWNERS diff --git a/.github/workflows/audit.yml b/.forgejo/workflows/audit.yml similarity index 74% rename from .github/workflows/audit.yml rename to .forgejo/workflows/audit.yml index 2b68b82..b98bf6b 100644 --- a/.github/workflows/audit.yml +++ b/.forgejo/workflows/audit.yml @@ -12,11 +12,12 @@ on: - '**/Cargo.toml' - '**/Cargo.lock' - 'deny.toml' + pull_request: + branches: [main] jobs: security_audit: - runs-on: ubuntu-latest + runs-on: native steps: - uses: actions/checkout@v4 - - uses: taiki-e/install-action@cargo-deny - name: Scan for vulnerabilities - run: cargo deny check + run: nix develop --accept-flake-config --command cargo deny check diff --git a/.github/workflows/conventional-commits.yml b/.forgejo/workflows/conventional-commits.yml similarity index 81% rename from .github/workflows/conventional-commits.yml rename to .forgejo/workflows/conventional-commits.yml index c1d7b4c..874d590 100644 --- a/.github/workflows/conventional-commits.yml +++ b/.forgejo/workflows/conventional-commits.yml @@ -14,7 +14,7 @@ concurrency: jobs: build: name: Conventional Commits - runs-on: ubuntu-latest + runs-on: native steps: - uses: actions/checkout@v4 - - uses: webiny/action-conventional-commits@v1.3.0 + - uses: https://github.com/webiny/action-conventional-commits@v1.3.0 diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..c75496a --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,5 @@ +# SPDX-FileCopyrightText: 2024 Christina Sørensen +# +# SPDX-License-Identifier: EUPL-1.2 + +github: cafkafk diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index 552160b..0000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,21 +0,0 @@ -# SPDX-FileCopyrightText: 2024 Christina Sørensen -# -# SPDX-License-Identifier: EUPL-1.2 - -# To get started with Dependabot version updates, you'll need to specify which -# package ecosystems to update and where the package manifests are located. -# Please see the documentation for all configuration options: -# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates - -version: 2 -updates: - - package-ecosystem: "cargo" # See documentation for possible values - directory: "/" # Location of package manifests - schedule: - interval: "weekly" - - package-ecosystem: "github-actions" - # Workflow files stored in the - # default location of `.github/workflows` - directory: "/" - schedule: - interval: "weekly" diff --git a/.github/workflows/flake.yml b/.github/workflows/flake.yml deleted file mode 100644 index 728bb81..0000000 --- a/.github/workflows/flake.yml +++ /dev/null @@ -1,63 +0,0 @@ -# SPDX-FileCopyrightText: 2024 Christina Sørensen -# -# SPDX-License-Identifier: EUPL-1.2 - -on: - workflow_dispatch: - pull_request: - branches: [main] - paths: - - '.github/workflows/flake.yml' - - 'src/**' - - 'Cargo.*' - - "*.toml" - - "flake.*" - - "*.nix" - - "*.rs" - push: - branches: [main] - paths: - - '.github/workflows/flake.yml' - - 'src/**' - - 'Cargo.*' - - "*.toml" - - "flake.*" - - "*.nix" - - "*.rs" -concurrency: - group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }} - cancel-in-progress: true -jobs: - flake-checker: - name: Flake Checker - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v4 - - name: Check Nix flake inputs - uses: DeterminateSystems/flake-checker-action@v8 - check: - name: Check Nix Flake - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v4 - - name: Install Nix - uses: DeterminateSystems/nix-installer-action@v13 - - name: Setup Nix cache - uses: DeterminateSystems/magic-nix-cache-action@main - - name: Nix Flake Check - run: nix flake check --all-systems - build: - name: Build Nix package - # if cross compilation is desired add 'aarch64-linux', 'x86_64-darwin' and 'aarch64-darwin' and fix the flake to support cross compilation. - strategy: - matrix: - target: [x86_64-linux] - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v4 - - name: Install Nix - uses: DeterminateSystems/nix-installer-action@v13 - - name: Setup Nix cache - uses: DeterminateSystems/magic-nix-cache-action@main - - name: Nix Build - run: nix build .#packages.${{ matrix.target }}.default diff --git a/.github/workflows/unit-tests-bsd.yml b/.github/workflows/unit-tests-bsd.yml deleted file mode 100644 index f31934f..0000000 --- a/.github/workflows/unit-tests-bsd.yml +++ /dev/null @@ -1,97 +0,0 @@ -# SPDX-FileCopyrightText: 2024 Christina Sørensen -# -# SPDX-License-Identifier: EUPL-1.2 - -name: Unit tests (BSD) -on: - push: - branches: [main] - paths: - - '.github/workflows/unit-tests-bsd.yml' - - 'src/**' - - 'Cargo.*' - - build.rs - pull_request: - branches: [main] - paths: - - '.github/workflows/unit-tests-bsd.yml' - - 'src/**' - - 'Cargo.*' - - build.rs -concurrency: - group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }} - cancel-in-progress: true -jobs: - unit-tests-freebsd: - runs-on: ubuntu-22.04 - timeout-minutes: 20 - steps: - - uses: actions/checkout@v4 - with: - submodules: recursive - - name: Compile - uses: vmactions/freebsd-vm@v1 - with: - release: '14.1' - usesh: true - prepare: | - pkg install -y rust git - cargo install cargo-hack - git config --global --add safe.directory /home/runner/work/eza/eza - run: | - set -e - export CARGO_TERM_COLOR="always" - export RUSTFLAGS="--deny warnings" - cargo fmt --check - cargo clippy -- -D warnings - cargo hack test - unit-tests-netbsd: - runs-on: ubuntu-22.04 - timeout-minutes: 20 - steps: - - uses: actions/checkout@v4 - with: - submodules: recursive - - name: Compile - uses: vmactions/netbsd-vm@v1 - with: - release: '10.0' - usesh: true - prepare: | - PATH="/root/.cargo/bin:/usr/pkg/sbin:/usr/pkg/bin:$PATH" - PKG_PATH="https://ftp.netbsd.org/pub/pkgsrc/packages/NetBSD/amd64/10.0/All/" - export PATH PKG_PATH - /usr/sbin/pkg_add pkgin - pkgin -y install rust git - cargo install cargo-hack - git config --global --add safe.directory /home/runner/work/eza/eza - run: | - set -e - export CARGO_TERM_COLOR="always" - export RUSTFLAGS="--deny warnings" - cargo fmt --check - cargo clippy -- -D warnings - cargo hack test - unit-tests-openbsd: - runs-on: ubuntu-22.04 - timeout-minutes: 20 - steps: - - uses: actions/checkout@v4 - with: - submodules: recursive - - name: Compile - uses: vmactions/openbsd-vm@v1 - with: - release: '7.4' - usesh: true - prepare: | - pkg_add rust rust-rustfmt rust-clippy git - cargo install cargo-hack - git config --global --add safe.directory /home/runner/work/eza/eza - run: | - set -e - export CARGO_TERM_COLOR="always" - export RUSTFLAGS="--deny warnings" - cargo fmt --check - cargo clippy -- -D warnings - cargo hack test diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml deleted file mode 100644 index e083b91..0000000 --- a/.github/workflows/unit-tests.yml +++ /dev/null @@ -1,51 +0,0 @@ -# SPDX-FileCopyrightText: 2024 Christina Sørensen -# -# SPDX-License-Identifier: EUPL-1.2 - -name: Unit tests -on: - push: - branches: [main] - paths: - - '.github/workflows/unit-tests.yml' - - 'src/**' - - 'Cargo.*' - - build.rs - pull_request: - branches: [main] - paths: - - '.github/workflows/unit-tests.yml' - - 'src/**' - - 'Cargo.*' - - build.rs -concurrency: - group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }} - cancel-in-progress: true -env: - CARGO_TERM_COLOR: always - RUSTFLAGS: --deny warnings -jobs: - unit-tests: - runs-on: ${{ matrix.os }} - continue-on-error: ${{ matrix.rust == 'nightly' }} - strategy: - matrix: - os: [ubuntu-latest, macos-latest, windows-latest] - rust: [1.70.0, stable, beta, nightly] - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - run: rustup toolchain install ${{ matrix.rust }} --profile minimal - - uses: Swatinem/rust-cache@v2 - - name: Install cargo-hack - uses: nick-fields/retry@v3 - with: - timeout_minutes: 5 - max_attempts: 5 - command: cargo install cargo-hack - - name: Run rustfmt checks - run: cargo fmt --check - - name: Run clippy lints - run: cargo clippy -- -D warnings - - name: Run unit tests - run: cargo hack test diff --git a/deny.toml b/deny.toml index 98ceb4d..919fb92 100644 --- a/deny.toml +++ b/deny.toml @@ -7,4 +7,4 @@ multiple-versions = 'allow' [licenses] private = { ignore = true } -allow = ["MIT"] +allow = ["MIT", "ISC", "MPL-2.0", "Apache-2.0", "Unicode-DFS-2016", "BSD-3-Clause"]