Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: initial release #1

Merged
merged 2 commits into from
Jul 8, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .github/workflows/actions_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Release GitHub Actions

on:
workflow_dispatch:
inputs:
tag:
description: "Tag for the release"
required: true

permissions:
contents: read

jobs:
release:
permissions:
actions: read
id-token: write
contents: write
uses: step-security/reusable-workflows/.github/workflows/actions_release.yaml@v1
with:
tag: "${{ github.event.inputs.tag }}"
32 changes: 32 additions & 0 deletions .github/workflows/buildjet.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: buildjet

on: [push, pull_request]

jobs:
buildjet:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]

name: Test buildjet provider on ${{ matrix.os }}
runs-on: ${{ matrix.os }}

env:
CARGO_TERM_COLOR: always

steps:
- uses: actions/checkout@v4

- run: rustup toolchain install stable --profile minimal --no-self-update

- uses: ./
with:
workspaces: tests
cache-provider: buildjet

- run: |
cargo check
cargo test
cargo build --release
working-directory: tests
45 changes: 45 additions & 0 deletions .github/workflows/check-dist.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: check dist/

on:
push:
branches:
- main
paths-ignore:
- "**.md"
pull_request:
paths-ignore:
- "**.md"
workflow_dispatch:

jobs:
check-dist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: npm

- name: Install dependencies
run: npm ci

- name: Rebuild the dist/ directory
run: npm run prepare

- name: Compare the expected and actual dist/ directories
run: |
if [ "$(git diff dist/ | wc -l)" -gt "0" ]; then
echo "Detected uncommitted changes after build. See status below:"
git diff
exit 1
fi
id: diff

- uses: actions/upload-artifact@v3
if: ${{ failure() && steps.diff.conclusion == 'failure' }}
with:
name: dist
path: dist/
30 changes: 30 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: coverage

on: [push, pull_request]

jobs:
coverage:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]

name: Test `cargo-llvm-cov` on ${{ matrix.os }}
runs-on: ${{ matrix.os }}

env:
CARGO_TERM_COLOR: always

steps:
- uses: actions/checkout@v4

- run: rustup toolchain install stable --profile minimal --component llvm-tools-preview --no-self-update

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

- uses: ./
with:
workspaces: tests

- run: cargo llvm-cov --all-features --workspace
working-directory: tests
31 changes: 31 additions & 0 deletions .github/workflows/git-registry.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: git-registry

on: [push, pull_request]

jobs:
git-registry:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]

name: Test cargo "git" registry on ${{ matrix.os }}
runs-on: ${{ matrix.os }}

env:
CARGO_TERM_COLOR: always
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: git

steps:
- uses: actions/checkout@v4

- run: rustup toolchain install stable --profile minimal --no-self-update

- uses: ./
with:
workspaces: tests

- run: |
cargo check
cargo test
working-directory: tests
25 changes: 25 additions & 0 deletions .github/workflows/install.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: install

on: [push, pull_request]

jobs:
install:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]

name: Test `cargo install` on ${{ matrix.os }}
runs-on: ${{ matrix.os }}

env:
CARGO_TERM_COLOR: always

steps:
- uses: actions/checkout@v4

- run: rustup toolchain install stable --profile minimal --no-self-update

- uses: ./

- run: cargo install cargo-deny --locked
31 changes: 31 additions & 0 deletions .github/workflows/simple.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: simple

on: [push, pull_request]

jobs:
simple:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]

name: Test `cargo check/test/build` on ${{ matrix.os }}
runs-on: ${{ matrix.os }}

env:
CARGO_TERM_COLOR: always

steps:
- uses: actions/checkout@v4

- run: rustup toolchain install stable --profile minimal --no-self-update

- uses: ./
with:
workspaces: tests

- run: |
cargo check
cargo test
cargo build --release
working-directory: tests
29 changes: 29 additions & 0 deletions .github/workflows/target-dir.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: target-dir

on: [push, pull_request]

jobs:
target-dir:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]

name: Test custom target-dir on ${{ matrix.os }}
runs-on: ${{ matrix.os }}

env:
CARGO_TERM_COLOR: always

steps:
- uses: actions/checkout@v4

- run: rustup toolchain install stable --profile minimal --no-self-update

# the `workspaces` option has the format `$workspace -> $target-dir`
# and the `$target-dir` is relative to the `$workspace`.
- uses: ./
with:
workspaces: tests -> ../custom-target-dir

- run: cargo test --manifest-path tests/Cargo.toml --target-dir custom-target-dir
33 changes: 33 additions & 0 deletions .github/workflows/workspaces.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: workspaces

on: [push, pull_request]

jobs:
workspaces:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]

name: Test multiple workspaces on ${{ matrix.os }}
runs-on: ${{ matrix.os }}

env:
CARGO_TERM_COLOR: always

steps:
- uses: actions/checkout@v4

- run: rustup toolchain install stable --profile minimal --target wasm32-unknown-unknown --no-self-update

- uses: ./
with:
workspaces: |
tests
tests/wasm-workspace

- run: cargo check
working-directory: tests

- run: cargo check
working-directory: tests/wasm-workspace
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
node_modules/
target/

# Editors
.idea/

# Mac
.DS_Store
Loading
Loading