From 2ee8c641e144700383ae6902c78c296c9166bb9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bastian=20M=C3=BCller?= Date: Fri, 18 Oct 2024 16:01:35 -0700 Subject: [PATCH 1/2] re-enable and update the Source Compatiblity Suite GitHub action --- .github/workflows/compat.yaml | 24 ++++++++++++++++++ .github/workflows/compat.yaml.disabled | 34 -------------------------- compat/main.py | 4 +-- compat/requirements.txt | 2 +- 4 files changed, 27 insertions(+), 37 deletions(-) create mode 100644 .github/workflows/compat.yaml delete mode 100644 .github/workflows/compat.yaml.disabled diff --git a/.github/workflows/compat.yaml b/.github/workflows/compat.yaml new file mode 100644 index 0000000000..ec22c71cf0 --- /dev/null +++ b/.github/workflows/compat.yaml @@ -0,0 +1,24 @@ +name: Source Compatibility Suite +on: + schedule: + - cron: '0 12 * * *' + workflow_dispatch: + inputs: + +jobs: + source-compat: + runs-on: ubuntu-latest + steps: + - name: Clone + uses: actions/checkout@v4 + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: '3.12' + cache: 'pip' + - name: Install dependencies + working-directory: compat + run: pip3 install -r requirements.txt + - name: Run + working-directory: compat + run: "python3 main.py" diff --git a/.github/workflows/compat.yaml.disabled b/.github/workflows/compat.yaml.disabled deleted file mode 100644 index 779ab60b88..0000000000 --- a/.github/workflows/compat.yaml.disabled +++ /dev/null @@ -1,34 +0,0 @@ -name: Source Compatibility Suite -on: - schedule: - - cron: '0 12 * * *' - workflow_dispatch: - inputs: - goTestRef: - - -jobs: - source-compat: - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - uses: actions/setup-go@v2 - with: - go-version: '1.18.x' - - uses: actions/setup-python@v2 - with: - python-version: '3.x' - - uses: actions/cache@v1 - with: - path: ~/go/pkg/mod - key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - restore-keys: | - ${{ runner.os }}-go- - - name: Install dependencies - working-directory: compat - run: pip3 install -r requirements.txt - - name: Check - working-directory: compat - run: "python3 main.py --format=pretty --check --go-test --go-test-ref=${{ github.event.inputs.goTestRef }}" diff --git a/compat/main.py b/compat/main.py index 9a973e9a80..999d451fbd 100644 --- a/compat/main.py +++ b/compat/main.py @@ -43,7 +43,7 @@ def run(self, working_dir: Path, prepare: bool, cadence_version: Optional[str], flowgo_replacement = f'github.com/onflow/flow-go@{flowgo_version}' else: # default: use the newest version of flow-go available - flowgo_replacement = f'github.com/onflow/flow-go@latest' + flowgo_replacement = 'github.com/onflow/flow-go@latest' with cwd(working_dir / self.path): if prepare: @@ -87,7 +87,7 @@ def from_dict(cls, data: Dict): def _clone(self, working_dir: Path): if working_dir.exists(): - for root, dirs, files in os.walk(working_dir): + for root, dirs, files in os.walk(working_dir): for dir in dirs: os.chmod(os.path.join(root, dir), stat.S_IRUSR | stat.S_IWUSR) for file in files: diff --git a/compat/requirements.txt b/compat/requirements.txt index 83eccf7636..f53480675e 100644 --- a/compat/requirements.txt +++ b/compat/requirements.txt @@ -1,5 +1,5 @@ click==7.1.2 coloredlogs==14.0 dacite==1.5.1 -PyYAML==5.4 +PyYAML>=6.0.1 typing-extensions==3.7.4.3 From e020579a8e4099b9ebfc3974333283ea31afb4b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bastian=20M=C3=BCller?= Date: Fri, 18 Oct 2024 16:06:14 -0700 Subject: [PATCH 2/2] update email addresses --- compat/suite/flow-core-contracts.yaml | 4 ++-- compat/suite/flow-ft.yaml | 4 ++-- compat/suite/flow-nft.yaml | 4 ++-- compat/suite/nba-smart-contracts.yaml | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/compat/suite/flow-core-contracts.yaml b/compat/suite/flow-core-contracts.yaml index 2b3cdcaa10..0be3807e9f 100644 --- a/compat/suite/flow-core-contracts.yaml +++ b/compat/suite/flow-core-contracts.yaml @@ -1,7 +1,7 @@ description: Flow Core Contracts maintainers: -- bastian@dapperlabs.com -- joshua.hannan@dapperlabs.com + - bastian.mueller@flowfoundation.org + - joshua.hannan@flowfoundation.org url: https://github.com/onflow/flow-core-contracts.git branch: master go_tests: diff --git a/compat/suite/flow-ft.yaml b/compat/suite/flow-ft.yaml index 3b872d692d..d0818d0b0b 100644 --- a/compat/suite/flow-ft.yaml +++ b/compat/suite/flow-ft.yaml @@ -1,7 +1,7 @@ description: Flow Fungible Token maintainers: -- bastian@dapperlabs.com -- joshua.hannan@dapperlabs.com + - bastian.mueller@flowfoundation.org + - joshua.hannan@flowfoundation.org url: https://github.com/onflow/flow-ft.git branch: master go_tests: diff --git a/compat/suite/flow-nft.yaml b/compat/suite/flow-nft.yaml index 958f72f5bb..eb57fb60df 100644 --- a/compat/suite/flow-nft.yaml +++ b/compat/suite/flow-nft.yaml @@ -1,7 +1,7 @@ description: Flow Non-Fungible Token maintainers: -- bastian@dapperlabs.com -- joshua.hannan@dapperlabs.com + - bastian.mueller@flowfoundation.org + - joshua.hannan@flowfoundation.org url: https://github.com/onflow/flow-nft.git branch: master go_tests: diff --git a/compat/suite/nba-smart-contracts.yaml b/compat/suite/nba-smart-contracts.yaml index 8e44b443f3..f0ec168994 100644 --- a/compat/suite/nba-smart-contracts.yaml +++ b/compat/suite/nba-smart-contracts.yaml @@ -1,7 +1,7 @@ description: NBA Top Shot maintainers: -- bastian@dapperlabs.com -- joshua.hannan@dapperlabs.com + - bastian.mueller@flowfoundation.org + - joshua.hannan@flowfoundation.org url: https://github.com/dapperlabs/nba-smart-contracts.git branch: master go_tests: