Skip to content

Commit

Permalink
Update github actions and templates (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
MonicaOlejniczak authored Aug 16, 2024
1 parent 096a255 commit 5b958ef
Show file tree
Hide file tree
Showing 12 changed files with 123 additions and 401 deletions.
1 change: 0 additions & 1 deletion .github/FUNDING.yml

This file was deleted.

62 changes: 0 additions & 62 deletions .github/ISSUE_TEMPLATE/Bug_Report.md

This file was deleted.

39 changes: 0 additions & 39 deletions .github/ISSUE_TEMPLATE/Feature_Request.md

This file was deleted.

27 changes: 0 additions & 27 deletions .github/ISSUE_TEMPLATE/RFC.md

This file was deleted.

9 changes: 0 additions & 9 deletions .github/ISSUE_TEMPLATE/config.yml

This file was deleted.

7 changes: 4 additions & 3 deletions .github/workflows/canary-release.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
# This workflow builds and releases all packages on the main branch with a canary
# dist tag. These packages contain changes that are not yet available in a publicly
# released version of Parcel.
name: canary-release
# released version of Atlaspack.
name: Canary Release

on:
push:
branches:
- v2
- main
workflow_dispatch:

jobs:
build-and-release:
name: Build and release canary
if: false
uses: ./.github/workflows/release.yml
secrets: inherit
with:
Expand Down
100 changes: 15 additions & 85 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
pull_request:
push:
branches:
- v2
- main

permissions:
contents: read
Expand All @@ -23,8 +23,6 @@ jobs:
with:
toolchain: stable
components: rustfmt
# use `--frozen-lockfile` to fail immediately if the committed yarn.lock needs updates
# https://yarnpkg.com/lang/en/docs/cli/install/#toc-yarn-install-frozen-lockfile
- run: yarn --frozen-lockfile
- run: yarn lint

Expand All @@ -50,21 +48,12 @@ jobs:
- run: yarn --frozen-lockfile
- run: yarn build-ts

benchmarks:
name: Benchmarks
runs-on: ubuntu-latest
steps:
- name: PR Benchmarks
uses: parcel-bundler/parcel-benchmark-action@master
env:
PARCEL_BENCHMARK_APIKEY: ${{ secrets.PARCEL_BENCHMARK_APIKEY }}

unit_tests:
name: Unit tests (${{ matrix.os }}, Node ${{ matrix.node }})
strategy:
matrix:
node: [18, 20]
os: [ubuntu-latest, macos-latest, windows-latest]
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
Expand All @@ -84,7 +73,7 @@ jobs:
- run: yarn --frozen-lockfile
- run: yarn build-native-release
- run: yarn test:unit
- name: Upload @parcel/rust artifacts on Linux with Node v20
- name: Upload @atlaspack/rust artifacts on Linux with Node v20
if: ${{ runner.os == 'Linux' && matrix.node == 20 }}
uses: actions/upload-artifact@v3
with:
Expand All @@ -99,7 +88,7 @@ jobs:
strategy:
matrix:
node: [18, 20]
os: [ubuntu-latest, macos-latest, windows-latest]
os: [ubuntu-latest, macos-latest]
version: [v2, v3]
# These tend to be quite flakey, so one failed instance shouldn't stop
# others from potentially succeeding
Expand All @@ -125,76 +114,17 @@ jobs:
- run: yarn build
- run: yarn test:integration-ci
env:
PARCEL_V3: ${{ matrix.version == 'v3' && 'true' || 'false' }}
ATLASPACK_V3: ${{ matrix.version == 'v3' && 'true' || 'false' }}

# Deployment steps taken from https://github.com/colinwilson/static-site-to-vercel/blob/master/.github/workflows/deploy-preview.yml
repl_build:
name: Build REPL
if: ${{ github.event_name == 'pull_request' }}
runs-on: ubuntu-latest
repl:
name: Deploy REPL
if: false # ${{ github.event_name == 'pull_request' }}
uses: ./.github/workflows/repl.yml
permissions:
contents: read
deployments: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
cache: yarn
node-version: 20
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
targets: wasm32-unknown-unknown
- name: Install wasm-opt
run: |
curl -L -O https://github.com/WebAssembly/binaryen/releases/download/version_116/binaryen-version_116-x86_64-linux.tar.gz
tar -xf binaryen-version_116-x86_64-linux.tar.gz
echo "$PWD/binaryen-version_116/bin" >> $GITHUB_PATH
- uses: Swatinem/rust-cache@v2
with:
key: wasm
- name: Bump max inotify watches
run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p;
- run: yarn --frozen-lockfile
- name: Build native packages
run: yarn build-native-release
- run: yarn build
- run: yarn build-native-wasm
- run: yarn workspace @parcel/repl build
# - name: Upload REPL
# uses: actions/upload-artifact@v3
# with:
# name: REPL
# path: 'packages/dev/repl/dist'
- name: Start Deployment
uses: bobheadxi/deployments@v1
id: deployment
with:
step: start
token: ${{ secrets.GITHUB_TOKEN }}
ref: ${{ github.head_ref }}
env: Preview
override: false
- name: Deploy to Vercel
uses: amondnet/vercel-action@v25
id: vercel-action
with:
vercel-token: ${{ secrets.REPL_VERCEL_TOKEN }}
vercel-org-id: ${{ secrets.REPL_VERCEL_ORG_ID }}
vercel-project-id: ${{ secrets.REPL_VERCEL_PROJECT_ID }}
github-comment: false
working-directory: packages/dev/repl
# vercel-args: '--prod'
scope: parcel
alias-domains: |
pr-{{PR_NUMBER}}.repl.parceljs.org
- name: Update Deployment Status
uses: bobheadxi/deployments@v1
if: always()
with:
step: finish
token: ${{ secrets.GITHUB_TOKEN }}
env: Preview
override: false
status: ${{ job.status }}
deployment_id: ${{ steps.deployment.outputs.deployment_id }}
env_url: ${{ steps.vercel-action.outputs.preview-url }}
secrets: inherit
with:
alias-domains: |
pr-{{PR_NUMBER}}.repl.atlaspack.org
environment: Preview
2 changes: 1 addition & 1 deletion .github/workflows/dev-release.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This workflow builds and releases all packages with a dev dist tag. Once published,
# the packages can be installed to streamline the testing and validation of changes, both
# locally and within CI, that have not yet been approved or merged into the main branch.
name: dev-release
name: Development Release

on:
workflow_dispatch:
Expand Down
Loading

0 comments on commit 5b958ef

Please sign in to comment.