mirror of
https://github.com/oxc-project/oxc.git
synced 2026-11-04 10:29:58 +00:00
ci: add GitHub Copilot agent environment setup workflow (#12700)
This commit is contained in:
1 parent
534ec6341d
commit
a47cbbca9d
2 files changed
+79
No files matched your search
@@ -0,0 +1,78 @@
|
||||
name: Copilot Setup Steps
|
||||
|
||||
# This workflow defines the setup steps that GitHub Copilot agents will use
|
||||
# to prepare the development environment for the oxc project.
|
||||
# It preinstalls tools and dependencies needed for Rust and Node.js development.
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
pull_request:
|
||||
types: [opened, synchronize]
|
||||
paths:
|
||||
- .github/workflows/copilot-setup-steps.yml
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- .github/workflows/copilot-setup-steps.yml
|
||||
|
||||
permissions: {}
|
||||
|
||||
jobs:
|
||||
setup:
|
||||
name: Setup Development Environment for Copilot
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# Checkout full repo for git history.
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- uses: oxc-project/setup-rust@cd82e1efec7fef815e2c23d296756f31c7cdc03d # v1.0.0
|
||||
with:
|
||||
cache-key: copilot
|
||||
save-cache: ${{ github.ref_name == 'main' }}
|
||||
tools: just,watchexec-cli,cargo-insta,typos-cli,cargo-shear,dprint
|
||||
|
||||
- uses: oxc-project/setup-node@f42e3bda950c7454575e78ee4eaac880a077700c # v1.0.0
|
||||
|
||||
- name: Verify installations
|
||||
run: |
|
||||
echo "=== Rust toolchain ==="
|
||||
rustc --version
|
||||
cargo --version
|
||||
|
||||
echo "=== Node.js and pnpm ==="
|
||||
node --version
|
||||
pnpm --version
|
||||
|
||||
echo "=== Command runner ==="
|
||||
just --version
|
||||
|
||||
echo "=== Development tools ==="
|
||||
watchexec --version
|
||||
cargo insta --version
|
||||
typos --version
|
||||
cargo shear --version
|
||||
dprint --version
|
||||
|
||||
echo "=== Project commands ==="
|
||||
just --list
|
||||
|
||||
- name: Setup complete
|
||||
run: |
|
||||
echo "🎉 Development environment setup complete!"
|
||||
echo "The following tools are now available:"
|
||||
echo " - Rust toolchain (version from rust-toolchain.toml)"
|
||||
echo " - Node.js and pnpm (versions from .node-version and"
|
||||
echo " package.json)"
|
||||
echo " - just command runner"
|
||||
echo " - Development tools: watchexec, cargo-insta, typos,"
|
||||
echo " cargo-shear, dprint"
|
||||
echo " - All Node.js dependencies installed"
|
||||
echo ""
|
||||
echo "You can now use 'just' commands to work with the project:"
|
||||
echo " - just ready # Run all checks"
|
||||
echo " - just fmt # Format code"
|
||||
echo " - just test # Run tests"
|
||||
echo " - just lint # Run linting"
|
||||
Reference in new issue
Block a user