Skip to content

Commit

Permalink
Merge pull request #3 from tajo/cleanup
Browse files Browse the repository at this point in the history
more fixes
  • Loading branch information
tajo committed Jul 5, 2023
2 parents efc2831 + 32e748e commit 266ee62
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 128 deletions.
40 changes: 0 additions & 40 deletions .github/workflows/bump-swc_core.yml

This file was deleted.

59 changes: 12 additions & 47 deletions .github/workflows/cargo.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
name: Cargo

on:
- push
- pull_request
push:
branches: ["main"]
pull_request:
types: [opened, synchronize]

env:
RUST_LOG: debug
Expand All @@ -14,18 +16,11 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
os: [ubuntu-latest]

name: Test - ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- name: Handle line endings
shell: bash
if: runner.os == 'Windows'
run: |
git config --system core.autocrlf false
git config --system core.eol lf
- uses: actions/checkout@v2
with:
submodules: true
Expand All @@ -41,48 +36,18 @@ jobs:
profile: minimal
override: true

- name: Configure path (windows)
shell: bash
if: runner.os == 'Windows'
run: |
echo 'C:\\npm\\prefix' >> $GITHUB_PATH
- uses: Swatinem/rust-cache@v2
with:
shared-key: "cargo-test"
cache-on-failure: true

- name: Run cargo test
run: |
cargo test --all --color always
publish:
name: "Publish"
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
needs:
- test
- name: Install rustfmt
run: rustup component add rustfmt

steps:
- uses: actions/checkout@v2
with:
submodules: true

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
override: true

- name: Install cargo-mono
uses: baptiste0928/cargo-install@v1.1.0
with:
crate: cargo-mono
version: "0.3.1"
locked: true
- name: Run cargo fmt --check
run: |
cargo fmt --all -- --check
- name: Publish
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
- name: Run cargo test
run: |
cargo mono publish --no-verify
cargo test --all --color always
3 changes: 1 addition & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
push:
branches:
- main
- ci

env:
RUST_LOG: debug
Expand Down Expand Up @@ -57,5 +56,5 @@ jobs:
run: |
npm publish --workspaces --access public
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
13 changes: 0 additions & 13 deletions scripts/bump-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,8 @@ function bumpNpm {
(cd $1 && yarn version --no-git-tag-version --patch)
}

function bumpCargo {
cargo mono bump $1 --breaking
}

CRATES="$(cargo metadata --format-version 1 \
| jq -r '.packages[] | select(.source == null) | .name')"


for PKG in ./packages/fusion; do
bumpNpm $PKG
git commit -a -m "Bump npm package: ${PKG}" || true
done

for CRATE in $CRATES
do
bumpCargo $CRATE
git commit -a -m "Bump cargo crate: ${CRATE}" || true
done
15 changes: 0 additions & 15 deletions scripts/dev/cleanup_test_log.js

This file was deleted.

7 changes: 0 additions & 7 deletions scripts/dev/cleanup_test_log.sh

This file was deleted.

4 changes: 0 additions & 4 deletions scripts/update-bump-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ upgradeCargo -p swc_atoms -p swc_common -p testing -p swc_ecmascript -p swc_ecma

git commit -a -m 'Update swc crates' || true

upgradeCargo -p styled_jsx -p modularize_imports -p swc_emotion

git commit -a -m 'Update extra crates' || true

./scripts/bump-all.sh

# Ensure that Cargo.lock is up-to-date
Expand Down

0 comments on commit 266ee62

Please sign in to comment.