Skip to content

Commit

Permalink
Added CI/CD workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
oskari1 committed Nov 24, 2023
1 parent 441f43d commit 88a52f5
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/continuous_deployment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Continuous deployment
on:
workflow_run:
branches: [main]
workflows: [Continuous integration]
types: [completed]

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: wasm32-unknown-unknown

- uses: jetli/trunk-action@v0.1.0
- uses: jetli/wasm-bindgen-action@v0.1.0

- uses: actions/checkout@v2

- run: trunk build --release --public-url /${{ github.event.repository.name }}/

- uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist
24 changes: 24 additions & 0 deletions .github/workflows/continuous_integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Continuous integration
on: [push, pull_request]

jobs:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- run: cargo test --all

format:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- run: cargo fmt --all -- --check

clippy:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- run: cargo clippy --all -- -D warnings

0 comments on commit 88a52f5

Please sign in to comment.