Skip to content

set up publish

set up publish #1

Workflow file for this run

name: CI
on:
push:
pull_request:
branches: ["main"]
concurrency:
# Cancel older, in-progress jobs from the same PR, same workflow.
# use run_id if the job is triggered by a push to ensure
# push-triggered jobs to not get canceled.
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
prettier:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
- name: Prettify code
uses: creyD/[email protected]
with:
prettier_options: --check **/*.{js,md,tsx,ts}
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ApeWorX/github-action@v2
- run: ape compile --size
# Upload ape build files for testing
- uses: actions/upload-artifact@v3
with:
name: ape-build-folder
path: .build/*.json
py-test:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: foundry-rs/foundry-toolchain@v1
- uses: ApeWorX/github-action@v2
# Ape build artifacts used for testing
- uses: actions/download-artifact@v3
with:
name: ape-build-folder
path: .build/
# TODO: Until `ApeWorX/github-action` supports poetry install
- run: pip install .
- run: ape test -s
js-test:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
# Ape build artifacts used for testing
- uses: actions/download-artifact@v3
with:
name: ape-build-folder
path: .build/
- run: npm install .
- run: npm run build --workspaces --if-present