Skip to content

Commit

Permalink
chore: fix links (#869)
Browse files Browse the repository at this point in the history
  • Loading branch information
noahnu authored Aug 21, 2024
1 parent d8ddb40 commit ee87380
Show file tree
Hide file tree
Showing 15 changed files with 734 additions and 685 deletions.
1 change: 1 addition & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
[flake8]
max-line-length=88
ignore=A005,W503
14 changes: 0 additions & 14 deletions .github/codecov.sh

This file was deleted.

File renamed without changes.
91 changes: 33 additions & 58 deletions .github/workflows/cicd.yml → .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,23 @@
name: Syrupy CICD
name: CI

on:
push:
branches:
- main
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

env:
CI: 1
VENV: .venv

permissions:
contents: read
checks: write

jobs:
analysis:
name: Code Analysis
Expand All @@ -24,6 +32,7 @@ jobs:
- name: Lint
run: |
poetry run invoke lint
tests:
name: Tests
runs-on: ${{ matrix.os }}
Expand All @@ -42,21 +51,20 @@ jobs:
- name: Install project dependencies
run: . script/bootstrap
shell: bash
- name: Run Tests
if: |
!(matrix.python-version == '3.12-dev' && matrix.os == 'ubuntu-latest')
shell: bash
run: poetry run invoke test
- name: Run Tests (with coverage)
id: tests-with-coverage
if: matrix.python-version == '3.12-dev' && matrix.os == 'ubuntu-latest'
shell: bash
run: poetry run invoke test --coverage
- name: Upload Coverage
if: matrix.python-version == '3.12-dev' && matrix.os == 'ubuntu-latest'
env:
CODECOV_TOKEN: "" # FIXME: Needs a new token.
- name: Run Tests
if: steps.tests-with-coverage.outcome == 'skipped'
shell: bash
run: ./.github/codecov.sh $GITHUB_EVENT_PATH
run: poetry run invoke test
- name: Upload Coverage
if: steps.tests-with-coverage.conclusion == 'success'
uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # v4.5.0
with:
token: ${{ secrets.CODECOV_TOKEN }}

# # TODO: How to do this with poetry?
# version_checks:
Expand Down Expand Up @@ -87,6 +95,9 @@ jobs:
runs-on: ubuntu-latest
if: "github.event_name == 'pull_request' && !contains(github.event.head_commit.message, '[skip ci]')"
needs: [tests]
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/[email protected]
- name: Setup Environment
Expand All @@ -100,58 +111,22 @@ jobs:
with:
tool: 'pytest'
output-file-path: benchmarks.json
github-token: ${{ secrets.GITHUB_TOKEN }}
github-token: ${{ github.token }}
auto-push: false
alert-threshold: '200%'
comment-on-alert: true
fail-on-alert: false
comment-always: true

dry_run:
name: Release Test Package
required_checks:
name: Required Checks
needs:
- analysis
- tests
- benchmark
runs-on: ubuntu-latest
# Dry run check does not need to wait for others
if: github.event_name == 'pull_request' && github.event.pull_request.head.ref == 'next' && !contains(github.event.head_commit.message, '[skip ci]')
if: always()
steps:
- uses: actions/[email protected]
with:
fetch-depth: 0
- name: Setup Environment
uses: ./.github/actions/setup-env
- name: Install project dependencies
run: . script/bootstrap
- name: Dry Release
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: "" # FIXME: Needs a new token.
run: |
poetry run invoke release --dry-run
release:
name: Release
runs-on: ubuntu-latest
needs: [analysis, tests] # [version_checks]
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && !contains(github.event.head_commit.message, '[skip ci]')
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: "" # FIXME: Needs a new token.
steps:
- uses: actions/[email protected]
with:
fetch-depth: 0
persist-credentials: false
- name: Setup Environment
uses: ./.github/actions/setup-env
- name: Install project dependencies
run: . script/bootstrap
- name: Release
uses: cycjimmy/[email protected]
with:
branch: main
dry_run: false
extra_plugins: |
@semantic-release/changelog
@semantic-release/exec
@semantic-release/git
env:
GITHUB_TOKEN: "" #FIXME: Needs a new token.
- name: Fail on error
if: contains(needs.*.result, 'failure') || cancelled()
run: exit 1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Syrupy Manual Release
name: Release

on:
workflow_dispatch:
Expand All @@ -11,18 +11,19 @@ jobs:
release:
name: Release
runs-on: ubuntu-latest
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: "" # FIXME: Needs a new token.
environment: release
steps:
- uses: actions/[email protected]
with:
fetch-depth: 0
persist-credentials: false

- name: Setup Environment
uses: ./.github/actions/setup-env

- name: Install project dependencies
run: . script/bootstrap

- name: Release
uses: cycjimmy/[email protected]
with:
Expand All @@ -33,4 +34,6 @@ jobs:
@semantic-release/exec
@semantic-release/git
env:
GITHUB_TOKEN: "" # FIXME: Needs a new token.
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_PUBLISH_TOKEN }}
GITHUB_TOKEN: ${{ secrets.RELEASE_GITHUB_PAT }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ pip-delete-this-directory.txt
.pytest_cache/
.mypy_cache/
.coverage
coverage
htmlcov/
benchmarks/test_cases/__snapshots__

Expand Down
Loading

0 comments on commit ee87380

Please sign in to comment.