This repository has been archived by the owner on Feb 23, 2024. It is now read-only.
chore: remove support for SwaySwap #1054
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "CI" | |
on: | |
pull_request: | |
types: [opened, synchronize, edited, closed] | |
jobs: | |
cancel-previous-run: | |
name: Cancel previous actions | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: n1hility/cancel-previous-runs@v2 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
validate-pr: | |
name: Validate PR title | |
runs-on: ubuntu-latest | |
steps: | |
- name: Pull request title check | |
uses: amannn/action-semantic-pull-request@v4 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ./.github/setup-node | |
- run: pnpm lint | |
- name: Run PNPM install | |
id: pnpm-cache | |
run: | |
pnpm recursive install --frozen-lockfile | |
test: | |
# Disable tests | |
if: false | |
name: Test | |
runs-on: ubuntu-latest | |
continue-on-error: false | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ./.github/setup-node | |
- uses: ./.github/setup-rust | |
- uses: ./.github/setup-docker | |
with: | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Run PNPM install | |
id: pnpm-cache | |
run: | |
pnpm recursive install --frozen-lockfile | |
- name: Setup scripts | |
run: | | |
pnpm scripts:setup | |
- name: Build Contracts | |
run: | | |
pnpm contracts:build | |
# As contracts are really Heavy to build | |
# and test we only test it when some | |
# contract was updated on the PR | |
- name: Change contracts | |
id: changed-contracts | |
uses: tj-actions/[email protected] | |
with: | |
files: | | |
**/*.sw | |
**/*.rs | |
**/Cargo.toml | |
**/Forc.toml | |
- name: Test Contracts | |
if: ${{ steps.changed-contracts.outputs.any_changed == 'true' }} | |
run: | | |
./scripts/test-contracts.sh | |
- name: Run test | |
run: | | |
pnpm ci:test:coverage | |
end-to-end-test: | |
# Disable tests | |
if: false | |
name: Test E2E | |
runs-on: ubuntu-latest | |
continue-on-error: false | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ./.github/setup-node | |
- uses: ./.github/setup-rust | |
- uses: ./.github/setup-docker | |
with: | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Run PNPM install | |
id: pnpm-cache | |
run: | |
pnpm recursive install --frozen-lockfile | |
- name: Setup scripts | |
run: | | |
pnpm services:setup-test | |
- name: Install Playwright | |
run: pnpm exec playwright install --with-deps chromium | |
- name: End-to-end tests | |
run: xvfb-run --auto-servernum -- pnpm test:e2e | |
env: | |
# Recommended: pass the GitHub token lets this action correctly | |
# determine the unique run id necessary to re-run the checks | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NODE_ENV: "test" | |
- name: Upload test results | |
uses: actions/upload-artifact@v2 | |
if: always() | |
with: | |
name: playwright-report | |
path: packages/app/playwright-report/ | |
retention-days: 30 |